[TYPO3-mvc] ViewHelper standalone?

Armin Rüdiger Vieweg armin.vieweg at diemedialen.de
Mon Mar 21 18:59:23 CET 2011


> Hi,
>
> is it possible to call a viewhelper standalone in a pibase context?
>
> Thanks
> Georg

Have you tried to make an instance of your viewhelper and call the method  
render?
Something like that:

$viewhelper =  
t3lib_div::makeInstance('Tx_Extensionname_ViewHelpers_CoolStuffViewHelper');
$blah = $viewhelper->render(':D');

Maybe you'll have to make an instance of Tx_Extbase_Object_ObjectManager  
and get or create the viewhelper, instead of making a direct instance of  
it.

Best regards
Armin


More information about the TYPO3-project-typo3v4mvc mailing list