How would I assign a page title once in the bootstrap (so I don’t have to do it in each controller)? Is there a link that will point me in the right direction?
Is using the bootstrap the correct way?
I currently have this in each controller:
public function indexAction()
{
$this->view->title = 'Cut It Out';
}
layout.phtml has this:
<h1><?php echo $this->escape($this->title); ?></h1>
You could use a view helper for this to echo the title into your layout script in layouts/layout.phtml.
Create the file /application/views/helpers/SiteTitle.php :-
Then in your layout head section you would have:-
If you want it in the body somewhere:-