如何在 Phalcon Controller 中设置自定义标题
How to set custom title in Phalcon Controller
我创建了主布局、布局和控制器视图。
但是如何在视图中设置自定义标题产品/名称?
主要布局
{{ get_doctype() }}
<html>
<head>
{{ get_title() }}
</head>
<body>
{{ content() }}
</body>
</html>
布局
{{ content() }}
和控制器视图
"Controller View"
在索引控制器中
Phalcon\Tag::setTitle("Welcome to my Page");
什么都没有 return?
请帮忙!
检查位于 https://github.com/phalcon/invo/blob/master/app/controllers/ControllerBase.php
中的示例基本控制器
稍后再看其他控制器如何使用initialize()来定义tittle
我创建了主布局、布局和控制器视图。
但是如何在视图中设置自定义标题产品/名称?
主要布局
{{ get_doctype() }}
<html>
<head>
{{ get_title() }}
</head>
<body>
{{ content() }}
</body>
</html>
布局
{{ content() }}
和控制器视图
"Controller View"
在索引控制器中
Phalcon\Tag::setTitle("Welcome to my Page");
什么都没有 return? 请帮忙!
检查位于 https://github.com/phalcon/invo/blob/master/app/controllers/ControllerBase.php
中的示例基本控制器稍后再看其他控制器如何使用initialize()来定义tittle