Reputation: 67
I was created a main layout , layouts , and controller view .
But how to set custom title product / name in view ?
Main layouts
{{ get_doctype() }}
<html>
<head>
{{ get_title() }}
</head>
<body>
{{ content() }}
</body>
</html>
Layouts
{{ content() }}
And Controllers View
"Controller View"
In IndexController
Phalcon\Tag::setTitle("Welcome to my Page");
And Nothing return ? Please help !
Upvotes: 3
Views: 1023
Reputation: 1302
Checkout the example base controller located in https://github.com/phalcon/invo/blob/master/app/controllers/ControllerBase.php
Later look at how the other controllers use initialize() to define tittle.
Upvotes: 2