[TYPO3-dev] parse typoscript setup and constants for eID script

Simon Schaufelberger (Schaufi) simonschaufi at jesus.de
Tue Nov 8 00:23:23 CET 2011


Hello developers!
i have an eID script and want to parse typoscript there which works 
perfectly fine so far but the only problem is that my *constants* don't 
get replaced and i am looking for a way how to do that properly.

my code snippet so far:

# initialize TSFE, fe_user and all this stuff...

$typoscriptInclude = '
<INCLUDE_TYPOSCRIPT: 
source="FILE:EXT:extension/Configuration/TypoScript/setup.txt">';

require_once(PATH_t3lib.'class.t3lib_tsparser.php');
$tsParser = t3lib_div::makeInstance('t3lib_TSparser');
$externalTSFileContent = $tsParser->checkIncludeLines($typoscriptInclude);
$tsParser->parse($externalTSFileContent);

$GLOBALS['TSFE']->tmpl->setup = $tsParser->setup;

what i want to do is something like this:

$typoscriptConstantsInclude = '
<INCLUDE_TYPOSCRIPT: 
source="FILE:EXT:extension/Configuration/TypoScript/constants.txt">';
# parse the constants and then make them "available" to be replaced by 
the setup part that comes now...
-- 
Regards, Schaufi



More information about the TYPO3-dev mailing list