views:

34

answers:

3

Hi i have a lot of common html that i want to use in a layout by doing :

zf enable layout

however the problem is want this layout to be shown on every action apart from the loginAction() that i have created within the controller?

+1  A: 

IF I understand correct, you are looking for somthing like this:

    $this->_helper->layout->setLayout('foobaz');

Just add it to your loginAction and replace foobaz with the layout you really want to display.

More information about the layout can be found at:

http://framework.zend.com/manual/en/zend.layout.quickstart.html
Stegeman
A: 

You can disable the layout in an action by using:

$this->_helper->layout->disableLayout();
jakenoble
A: 

I do it the way @Stegeman said, by putting $this->_helper->layout->setLayout('foobar'); on the init() of my login/authentication controller, where there are other pages like retrieve password page. So those pages all have a different layout than the default.

doingsitups