jump to navigation

Zend Framework : Switching layout files April 17, 2011

Posted by Tournas Dimitrios in Zend Framework v1.10.

Switching layout files on the Zend Framework can be done very easy , this is the code :

 // Within controller
$this->_helper->_layout->setLayout('other-layout') //other-layout.phtml

//Within view script
<?php  $this->layout()->setLayout('other-layout'); ?>


I wouldn’t want that kind of logic in a view script unless you only got a really small number of view scripts so you know where to debug for these application critical settings.



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s