Hello,
First of all I need to set slot content in my filter.
My filters.yml look like this:
remember_me:
class: sfGuardRememberMeFilter
rendering: ~
security: ~
my_filter:
class: myFilter
cache: ~
execution: ~
Now, in myFilter I need to set slot AFTER the action is executed (like
postExecute). I need this for every module in my application, also in
plugin modules. If I set slot with:
$this->getContext()->getResponse()->setSlot('category_menu',
get_component('Category', 'menu', array('current_category' =>
$controller->currentCategory)));
It is not available in the template, because the slot is rendered
after the layout.
However, I can still setContent(). But setSlot() won't work.
If I move this command before $filterChain->execute(); the slot is
set, but the application logic gets broken.
I'm kind of stuck with this.
It would be also great to know how to set view vars for a action from
a filter, but I think I can sort this out on a per module basis.
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en.