I got my headTitle up running, except i cannot echo it in my layout file as i need it for page header.
This is how i done it:
Bootstrap.php:
protected function _initDefaultHelpers() {
$this->bootstrap('view');
$view = $this->getResource('view');
$view->headTitle('Awesome Website');
$view->headTitle()->setSeparator(' - ');
My Controller:
public function indexAction() {
$this->_helper->layout()->getView()->headTitle('IndexPage');
}
When i open index i get: Awesome Website - IndexPage, which is perfect.
But in my master.phtml where i use:
<?php echo $this->headTitle(); ?>
Gives absolutely nothing. At this point i only want the title "IndexPage" and not the entire title, so this also has to be considered.
Thanks in advance.
this work: tested by me locally after creating a new project with zend tool!
//application.ini
//into Bootstrap.php
//into layout.phtml
//into view
//create view/helper/PageTitle.php
After that the name of your page will be: Foo :: Bar