[Typo3-dev] Calling a plugin from within another plugin

S. Teuber traveler_in_time at gmx.net
Tue Jan 13 13:40:45 CET 2004


Hi everyone,

is there any way to include content delivered by a plugin in another 
plugin?

Scenario:
I have a plugin that generates some output. I can call that plugin using 
TS as follows:

temp.content1 < plugin.tx_firstplugin_pi1

Works fine, the content that's coming from the plugin gets parsed (and 
displayed by setting marks.BLA < temp.content1).


Now, I have a second plugin that works the very same way, like this:

temp.content2 < plugin.tx_secondplugin_pi1

No problem whatsoever. BUT, now there's the question: I need the second 
plugin to render one or more content-objects using the first plugin. I 
already tried using cObjGetSingle() in the 2nd plugin the following way:

$content = $this->cObj->cObjGetSingle(
             '< plugin.tx_firstplugin_pi1',
             array(),
             'content1'
         );

Since this didn't work, I tried something more "basic":

$content = $this->cObj->cObjGetSingle(
             '< styles.content.get',
             array(),
             ''
         );

To no avail. Apparently I didn't quite really understand how 
cObjGetSingle() works, although I peeked into the sourcecode of 
class.tslib_content.php. :-(

Maybe someone can help? I'd really appreciate it.

Thanx in advance,

Sven




More information about the TYPO3-dev mailing list