[TYPO3-mvc] Get Controllers settings in viewhelper

Marc Bastian Heinrichs typo3 at mbh-web.de
Sat Mar 8 19:36:00 CET 2014


Hey,

Am 07.03.2014 22:18, schrieb Steffen Müller:
> Hi.
> 
> Am 06.03.2014 10:42, schrieb Philipp Wrann:
>>
>>
>> But is it possible to get the settings from the controllerContext in the
>> viewHelper without passing it?
>> I have a few hundered views and most of them contain multiple
>> viewhelpers where i want to access those settings, i dont want to adjust
>> all views, is there a way to do something like this within a fluid
>> viewhelper:
>>
>> $this->controllerContext->getSettings()?
> 
> Forget about controllerContext in your view. The view does not know
> about ControllerContext. Don't couple it.

Sure, every viewHelper has the ControllerContext, but the
ControllerContext has nothing to do with the settings.

So use the Configuration how Steffen wrote.

Best,
Maba


More information about the TYPO3-project-typo3v4mvc mailing list