[TYPO3-dev] order of rendering of plugins

Gijs Epping gijs.epping at efocus.nl
Wed Jan 30 09:51:44 CET 2008


stefano cecere schreef:
> Dmitry Dulepov [typo3] wrote:
>> Hi!
>>
>> stefano cecere wrote:
>>> subparts.plugin_1 < plugin.tx_plug_pi1
>>> subparts.plugin_2 < plugin.tx_plug_pi2
>>>
>>>
>>> my two plugins are called in this order: pi1 first and p2 second.
>>>
>>> BUT i need to call pi2 first and pi1 after it (because in pi2 i set 
>>> some session variable that has to be read by pi1)
>>>
>>> it seems IMPOSSIBLE to do it
>>> i tried in every way but Typo3 seems to call the plugins followin the 
>>> order of the ###TAGS### in the template.
>>
>> It calls them in the logical order :)
>>
>> If I were you, I would exract that session thing into pi3, call it it 
>> before both plgins and assign its empty output to another marker, 
>> which goes before these two.
> 
> thanks dimitry
> 
> the problem is that pi2 set/deletes some data and put them in the session.
> pi1 needs to display that info in the top header of the page (something 
> like the logged user.. for example)
> 
> yes.. your is a pragmatical solution.. not very nice from the 
> programming style...
> 
> 
> i should move all this logical part to pi1 (arg) or
> maybe i should hack the TEMPLATE renderer, to follow the TS array order, 
> and not the ###markers### order in the html templates?
> 
> stefano

he Stefano,

Take a look at my previously posted question and answer on how to call 
other pi's

You can call pi1 class from pi2 class with this command.

   function getpi1content($content, $conf) {
     $piConf = $GLOBALS['TSFE']->tmpl->...
     $piObj = t3lib_div::makeInstance("tx_efrpho_pi1");
     $piObj->cObj =& $this->cObj;
     $piObj->theVerySpecialFunction($piConf, ...);
   }

May be you can use this.

Regards
Gijs






More information about the TYPO3-dev mailing list