[TYPO3-mvc] Get Controllers settings in viewhelper

Andreas Kiessling andreas.kiessling at web.de
Sun Mar 9 22:06:59 CET 2014


Hi,

>>>
>>> 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()?
>>

Have a look at the "render" ViewHelper. It gets the settings by calling
$this->templateVariableContainer->get('settings')

HTH,
Andreas


More information about the TYPO3-project-typo3v4mvc mailing list