0

How is everyone else handing stuff like this?

I'm building a site with ZF, it has 1 layout. Some actions on the site open a ajax or iframe (Fancybox) lightbox to display forms and views. So we need to turn off the layout so the header/background/etc is not displayed, but then I would lose the main body of the layout, like HTML body, Header section with all the default helpers, etc.

In this instances, should I just setup two layouts, or is there a better method to go about handling that?

This is on ZF1

1 Answer 1

1

I would create another layout (let's call it minimal.phtml). In the controller handling the Ajax you can change the layout script inthe init() function with...

Zend_Layout::getMvcInstance()->setLayout('minimal');

Or

 $this->_helper->layout->setLayout('minimal');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.