How to set up custom title in Phalcon controller

I created the main layout, layouts and controller view.

But how to set a custom title product / name in sight?

Basic layouts

{{ get_doctype() }} 
<html>  
<head>      
    {{ get_title() }}
</head>     
<body>    
    {{ content() }} 
</body> 
</html>

      

Layouts

{{ content() }}

      

And view controllers

"Controller View"

      

In IndexController

Phalcon\Tag::setTitle("Welcome to my Page");

      

And nothing will come back? Please, help!

+3


source to share


1 answer


Check out a basic controller example located at https://github.com/phalcon/invo/blob/master/app/controllers/ControllerBase.php



Later, see how other controllers use initialize () to determine the title.

+2


source







All Articles