[TYPO3-mvc] Call ViewHelper from another ViewHelper

Tim Schoch | GSTALTIG tim.schoch at gstaltig.ch
Wed Jan 19 10:42:29 CET 2011


Hello List

I'm trying to call one of my viewhelpers from within another one with something like this:

// get render method parameters
$renderMethodParameters = array(
  'controller' => 'Project',
  'action' => 'show',
  'arguments' => array(
    'project' => $project
  )
);
  // get viewhelper
$viewHelper = t3lib_div::makeInstance( 'Tx_Gstbase_ViewHelpers_Link_ActionViewHelper' );
$viewHelper->initializeArgumentsAndRender( $renderMethodParameters );

This wont work, is there a way to get a fully functionall viewhelper?
I've read about the bootstrapper? Is this the way to go?

Thanks, Tim


More information about the TYPO3-project-typo3v4mvc mailing list