[TYPO3-mvc] Feature request for Fluid: add contentObjectData by default
Bastian Waidelich
bastian at typo3.org
Fri Sep 9 17:03:38 CEST 2011
Sebastian Kurfürst wrote:
> I would rather not like predefined variables in the view [...]
I agree.
> That's why I'd suggest to use a ViewHelper for including this variable
> in the Template, as it has been suggested by Søren.
Alternatively you could create an abstract basecontroller (which is
always a good idea) and pass it to the view yourself by overriding the
initializeView() method:
protected function initializeView(Tx_Extbase_MVC_View_ViewInterface $view) {
$view->assign('contentObjectData',
$this->configurationManager->getContentObject()->data);
}
Best,
Bastian
More information about the TYPO3-project-typo3v4mvc
mailing list