Reputation: 1075
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
Upvotes: 0
Views: 31
Reputation: 2143
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');
Upvotes: 1