[TYPO3] Re: [Typo3] Acccess typoscript constants (in templates) via PHP

Joerg Wagner - DigiLog multimedia usenet at digilog.de
Wed Feb 15 10:43:47 CET 2006


Actually this works for me:
    $GLOBALS['TSFE']->tmpl->flatSetup['MYCONSTANT']
e.g.:
    $GLOBALS['TSFE']->tmpl->flatSetup['temp.colors.maxCategories']

If you experience problems try the debug function from within your PHP code:
    t3lib_div::debug($GLOBALS['TSFE']->tmpl->flatSetup);

-- 
Mit freundlichen Grüßen,
Jörg Wagner.
DigiLog multimedia


"Matthias Taugwalder" <matthias.taugwalder at bluewin.ch> schrieb im 
Newsbeitrag 
news:mailman.4189.1118917914.19958.typo3-english at lists.netfielders.de...
>
> Hi all
>
> I have the following problem:
>
> There's a custom typo3 extension and I want to pass constant parameters 
> from
> the template to the extension.
> How can I access a constant which was defined in the Constants field of an
> template via PHP?
>
> I searched now for some time and found only hints as access them by...
>
> - $this->conf
>
> or
>
> - $GLOBALS['TSFE']->tmpl->flatSetup
>
>
> But nothing of it worked...
>
> I also debugged the array above with t3lib_div::debug() but without 
> success
> of finding the defined values
> in the templates' constants field.
>
> Thanks for any hint in advance.
>
>
> Best regards,
>
> Matthias Taugwalder
>
> ---
> Matthias Taugwalder
> matthias.taugwalder at bluewin.ch
>
> 





More information about the TYPO3-english mailing list