[TYPO3-dev] Get content from other plugin within plugin

Tomas Havner tomas.havner at kansli.lth.se
Wed Jan 27 16:01:43 CET 2010


Correct!

$conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_thmailformplus_pi1.'];
//Add templatefile to the configuration
$conf["email_htmltemplate"] = 
"fileadmin/template/mailformplus/simpleform.html";
// Get plugin instance
$cObj = t3lib_div::makeInstance('tslib_cObj');
/* @var $cObj tslib_cObj */
$cObj->start(array(), '');
$objType = 
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_thmailformplus_pi1'];
$content = $cObj->cObjGetSingle($objType, $conf);

did the trick.


Thank's to you all!

Tomas


"Dmitry Dulepov" <dmitry.dulepov+t3ml at gmail.com> skrev i meddelandet 
news:mailman.1.1264573223.7092.typo3-dev at lists.typo3.org...
> Hi!
>
> On 2010-01-26 16:44:08 +0200, Steffen Müller said:
>> $content = $cObj->cObjGetSingle('USER', $conf);
>
> Do not hard-code it to 'USER' because plugin can be USER_INT as well. Here 
> is the right call:
>
> $objType = 
> $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_thmailformplus_pi1'];
> $content = $cObj->cObjGetSingle($objType, $conf);
>
>> Taken from pagebrowse extension:
>> http://typo3.org/documentation/document-library/extension-manuals/pagebrowse/1.0.1/view/1/4/
>
> This
>>
> is just an example :) It is not necessarily apply to all extensions :)
>
> -- 
> Dmitry Dulepov
> "Trust me, I am a doctor!" (c) Gregory House, M.D.
> 






More information about the TYPO3-dev mailing list