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

Sebastian Gebhard sebastian.gebhard at gmail.com
Tue Jan 26 16:07:24 CET 2010


Am 26.01.2010 15:44, schrieb Steffen Müller:
> // Get plugin configuration
> $conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_thmailformplus_pi1.'];
>
> // Get plugin instance
> $cObj = t3lib_div::makeInstance('tslib_cObj');
> /* @var $cObj tslib_cObj */
> $cObj->start(array(), '');
> $content = $cObj->cObjGetSingle('USER', $conf);
>
> Taken from pagebrowse extension:
> http://typo3.org/documentation/document-library/extension-manuals/pagebrowse/1.0.1/view/1/4/
Basically good (this is exactly the way TYPO3 renders the plugins) butw hen you're within a plugin 
you don't need to initialize tslib_cObj.

You can do it shorter:

$content = $this->cObj->cObjGetSingle(
	'USER',
	$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_thmailformplus_pi1.']
);




More information about the TYPO3-dev mailing list