How to set page titles in Zend Framework

Welcome, today I will show you how to set page title on page in Zend Framework.
In Zend Framework, you can set the page title in the controller, like in the example below:

class Panel_TestsController extends Zend_Controller_Action
  public function testAction() {
    //  setting the page title
    $this->_helper->layout()->getView()->headTitle('View all students');

or in the view:

 * views/scripts/tests/index.phtml
$this->headTitle('View all students');

And that’s all. Good luck

Posted in Php, Zend Framework at September 17th, 2011. 3 Comments.