Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call TYPO3 plugin from other plugin's body

I need to call typo3 plugin from other plugin's body and pass its result to template. This is pseudo-code that describes what I want to achieve doing this:

$data['###SOME_VARIABLE###'] = $someOtherPlugin->main();
$this->cObj->substituteMarkerArray($someTemplate, $data);

Is it possible?

Thanks!

like image 306
Jacek Francuz Avatar asked Dec 22 '22 09:12

Jacek Francuz


1 Answers

It doenst work if you use the whole pi construct, e.g. for links, marker function etc, and the TSFE Data can be corrupted.

Dmitry said: http://lists.typo3.org/pipermail/typo3-english/2008-August/052259.html

$cObjType = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_rgsmoothgallery_pi1'];
$conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_rgsmoothgallery_pi1.'];
$cObj = t3lib_div::makeInstance('tslib_cObj');
$cObj->start(array(), '_NO_TABLE');
$conf['val'] = 1;
$content = $cObj->cObjGetSingle($cObjType, $conf); //calling the main method
like image 160
mitchiru Avatar answered Jan 01 '23 03:01

mitchiru