Hi - thanks for taking a look at this.

I think the relevant parts of the code are:

In my Front Controller Plugin:
  function dispatchLoopStartup
  {
            $actionStack =
$front->getPlugin('Zend_Controller_Plugin_ActionStack');
            $menuAction = clone($request);
            $menuAction->setActionName('menu')
                    ->setControllerName('my_controller');
            $actionStack->pushStack($menuAction);
  }

In MyController:
  function menuAction
  {
     // stuff ...
     // menu viewscript renders like <div id=menu>menu item 1, menu item
2</div>
     $this->_helper->viewRenderer->setResponseSegment('menu');
  }

  function withLayoutAction
  {
     // stuff ...
     // withLayout viewscript renders like <div id=withLayout>some
with-layout text</div>
  }

  function noLayoutAction
  {
     $this->getHelper('layout')->disableLayout();
     // stuff
     // noLayout viewscript renders like <div id=noLayout>Some no-layout
stuff here</div>    
  }

In layout.phtml:
<H1>Menu</H1>
<?= $this->layout()->menu ?>

<H1>Main Content</H1>
<?= $this->layout()->content ?>




If I go to my_controller/withLayout, I get the menu and withLayout div
rendered at the layout placeholders as you'd expect, no problem.
If I go to my_controller/noLayout, I the full output is:
<div id=noLayout>Some no-layout stuff here</div><div id=menu>menu item 1,
menu item 2</div>

The content from menuAction is simply appended to the content from
noLayoutAction, which is exactly *not* what I want!

I'm not sure if I'm doing something wrong, or if this is somehow desired
behaviour, or whether this is in fact broken.

Thanks,
Mark
-- 
View this message in context: 
http://www.nabble.com/Disabling-Layout-with-ActionStack-causing-problems--tp23383426p23384586.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to