It should work.
However, note that the context switch looks for a 'format' parameter.
So what this means is that it will kick in when you access:
example.com/controller/action/format/json
2008/9/10 Ernesto <ernesto@emb.com.mx>:
> Hello all,
>
> Are plugins (or any other component for that matter) capable of re-enabling
> the layout after it has been disabled by contextSwitch helper?
>
> I have this in one controller:
>
> public function init()
> {
> $context = $this->_helper->getHelper('contextSwitch');
> $context->addActionContext('view', 'json')->initContext();
> }
>
> But the layout is not effectively disabled, so I have to manually disable it
> in my postDispatch action if the context is json
>
> I'm using ZF 1.6
>
>
> --
> Ernesto
>
--
My place to share my ideas:
http://vladev.blogspot.com
However, note that the context switch looks for a 'format' parameter.
So what this means is that it will kick in when you access:
example.com/controller/action/format/json
2008/9/10 Ernesto <ernesto@emb.com.mx>:
> Hello all,
>
> Are plugins (or any other component for that matter) capable of re-enabling
> the layout after it has been disabled by contextSwitch helper?
>
> I have this in one controller:
>
> public function init()
> {
> $context = $this->_helper->getHelper('contextSwitch');
> $context->addActionContext('view', 'json')->initContext();
> }
>
> But the layout is not effectively disabled, so I have to manually disable it
> in my postDispatch action if the context is json
>
> I'm using ZF 1.6
>
>
> --
> Ernesto
>
--
My place to share my ideas:
http://vladev.blogspot.com
没有评论:
发表评论