[TYPO3] TS Constant access from extension

Peter Niederlag niederlag at ikd01.de
Thu Jun 12 12:08:06 CEST 2008


Hi Xavier,

Xavier Perseguers schrieb:
> Hi,
> 
> How may I access a constant defined in my page's template from within my
> own extension ?
> 
> I found it in $GLOBALS['TSFE']->tmpl->flatSetup['constant-key'] but it
> seems not to be reliable as it is not always there :-/

IMO constants are in now way ment to be used that way!

Refer the constant in your extensions TypoScript-Setup:
plugin.tx_foobar_pixy.whatever = {$iWantThisConstant}

Now you can easily access the "constant" via $this->conf['whatever'].

How 'bout that?

Greets,
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
http://www.typo3partner.net * professional services network *


More information about the TYPO3-english mailing list