[TYPO3-english] Accessing extension constant from php script
Jackie Stallard
jstallard at internode.on.net
Mon Aug 22 03:35:52 CEST 2011
I've created an extension constant in ext_conf_template.txt and I can
see it from the extension manager.
According to the documentation I should be able to access the constant
in my PHP script as follows:
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['austcom_merge']['austcom_mergeDb']
(where austcom_merge is the name of my extension and austcom_mergeDb is
my constant.)
But there is no 'austcom_merge' tree in
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']. Other extensions are
listed - but not austcom_merge.
Have I missed a step?
I've also tried placing the constant in ext_localconf.php as follows:
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['austcom_mergeDb'] = 'newprojman';
Again, there is no 'austcom_merge' tree under $TYPO3_CONF_VARS['EXTCONF']
Can anyone help?
Thanks
Jackie
More information about the TYPO3-english
mailing list