[FLOW3-general] Same variable in every template
"Christian Müller (FLOW3 Team)"
christian.mueller at typo3.org
Mon Feb 27 16:37:30 CET 2012
Hi Martin,
what about the initializeAction() method? You can assign to the view
there and you could even create an abstract BaseController and put it
there then extend all your controllers from that so in fact you have to
set it only once.
Cheers,
Christian
On 27/02/12 16:19, Martin Lipp wrote:
> I would like to assign the same variable in every action and all
> available controllers in order to output it in the layout (all templates
> share the same layout). Is there an easy way/a best practice to do this,
> without having to assign it in every single action, which seems to
> redundant? I've thought of an ViewHelper which returns me the variable,
> but I'm not sure, if it's a good practice to add repository functions to
> a ViewHelper.
>
> Thanks,
> Martin
More information about the FLOW3-general
mailing list