[TYPO3] Value from extension to TypoScript

Elmar Hinz elmar07 at googlemail.com
Mon Sep 3 00:08:28 CEST 2007


Jan Bednarik wrote:

> Hey,
> 
> is it possible to transfer a value from extension to TypoScript?
> 
> If I have in ext sth. like
> 
> $GLOBALS['FOO']['boo'] = 'value';
> 
> and in TS:
> 
> sth = TEXT
> sth.data = global : FOO|boo
> 
> it doesn't work, because TEXT is rendered before the extension, that
> means, the value is set after it's rendered by TEXT element.
> 
> Any ideas on how to make this work?
> 
> Thanks
> 

Hi Jan,

the file ext_localconf.php is executed before the TS tree is rendered. If
possible place it there. 

If that is not possible and you have to set the value within a plugin
script: 

The plugins are triggert directly from the rendered TS. Here it depends on
the order in which the objects occur in TS/in the page. If the order is
wrong you need to find a way to change the order. 

If the output needs a different order from inclusion, you can store the
output in a global variable for the point where the output is needed. I
call this for myself a 'pipe' or a 'tunnel'. You can use an additional
plugin that is nothing else than the output of the tunnel.

Regards

Elmar























More information about the TYPO3-english mailing list