Yes.
You need to look at registering context types within the init() function
that get checked. So for instance, you can register an action to be used as
an RSS Handle when called. Once again, I'm a bit hazy on the specifics, but
I would look at the code behind the AjaxContext plugin, or any other context
plugin. I worked with this awhile ago, and I think I was operating the
layout incorrectly because it literally took me half the night to get it
functioning correctly. There is hope though, and it's with the context
plugins.
Sam Davey wrote:
>
> Thanks,
>
> That makes sense. And I would certainly be able to do that if it was an
> Ajax request because I would be able to identify it before the plugin was
> registered.
>
> However the type of functionality I am talking about is disabling the
> Layout for a particular view such as one that will spit out an RSS feed or
> one that formats the page without layout ready for printing.
>
> As such I won't detect that the layout is disabled until the view of the
> main content is rendered and I can call the
> $this->_helper->layout()->disableLayout(); method.
>
> I understand that the action stack and layout plugins are completely
> different. But it was my understanding that the action stack is a useful
> way to stack up complicated controller/view operations ready to be slotted
> into the layout.
>
> As such does anyone know an effective way of stopping or emptying the
> action stack if the layout is disabled. Where should this logic fit in?
>
>
>
>
>
> xxjonkushxx wrote:
>>
>> I could be slightly incorrect, but it is my understanding that these are
>> two completely separate plugins. The layout plugin will be executed
>> postdispatch, whereas the actionstack is a queue of requests that get
>> dispatched.
>>
>> With this logic, you've already fired off your actionstack before you had
>> time to disable the layout ( not that they are connected ). I think you
>> should just unregister the plugin predispatch if the request meets a
>> certain condition you want.
>>
>> I.E.
>>
>> If ( is Ajax Request ) {
>> $fc->unregisterPlugin(ActionStack);
>> }
>>
>> I think this actual example is incorrect, however the logic I believe is
>> correct.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Zend_Layout---Disable-action-stack-output-tp18005744p18052355.html
Sent from the Zend Framework mailing list archive at Nabble.com.