[TYPO3-dev] Call a viewhelper in another viewhelper
Marcel Menoud
marcel.menoud at gmail.com
Tue Jul 17 18:54:01 CEST 2012
Hello everybody,
For an extension, I would like to call some base viewhelpers from a custom
viewhelper :
- The Tx_Fluid_ViewHelpers_ImageViewHelper
- The Tx_Fluid_ViewHelpers_Link_ActionViewHelper
But I have some problems :
For the The Tx_Fluid_ViewHelpers_ImageViewHelper, I don't know how to pass
the mandatory argument "alt", since it is not a parameter of the render
method, and without it, this viewhelper return me an empty string.
For the Tx_Fluid_ViewHelpers_Link_ActionViewHelper, I dont't know how I
can set the child node (the text of the link)
I have create the instance of these ViewHelpers in this way in my
viewhelper :
$objectManager = t3lib_div::makeInstance(
'Tx_Extbase_Object_ObjectManager');
$imageViewHelper = $objectManager->create(
'Tx_Fluid_ViewHelpers_ImageViewHelper');
$linkViewHelper =
$objectManager->create('Tx_Fluid_ViewHelpers_Link_ActionViewHelper');
Do you have an idea to a way to call these viewhelpers ?
Thank you for your help,
Marcel
More information about the TYPO3-dev
mailing list