dean.vaughan
dean.vaughan

Reputation: 31

Zend Layout Question

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?

Upvotes: 0

Views: 124

Answers (3)

Edward Hew
Edward Hew

Reputation: 134

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.

Upvotes: 0

Jake N
Jake N

Reputation: 10583

You can disable the layout in an action by using:

$this->_helper->layout->disableLayout();

Upvotes: 0

Rene Terstegen
Rene Terstegen

Reputation: 8046

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

Upvotes: 2

Related Questions