[TYPO3-dev] How to get the extension typoscript configuration inside an eID script?
Patrick Broens
patrick at netcreators.com
Sun Nov 15 20:46:21 CET 2009
Ries van Twisk wrote:
>
> On Nov 14, 2009, at 5:03 PM, Thomas Thasmo Deinhamer wrote:
>
>> Good evening!
>>
>> Does there exist a nifty way to get the final extension
>> typoscript configuration inside an eID script?
>>
>> I wanna use eID for performance reasons,
>> but can't use it without typoscript configuration.
>>
>> How's this done?
>>
>> Thanks a lot! =o)
>
> it's not...
It is ;-)
But you need to initialize tslib_fe, which is a huge overhead for Ajax
functionality.
First you make an instance of the tslib_fe class like:
$GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe',
$GLOBALS['TYPO3_CONF_VARS'],
t3lib_div::_GP('id'),
t3lib_div::_GP('type'),
and more variables if you want
);
(please check your incoming values ;-)
Do some other stuff (check if you need this)
$GLOBALS['TSFE']->connectToMySQL();
$GLOBALS['TSFE']->initFEuser();
$GLOBALS['TSFE']->determineId();
$GLOBALS['TSFE']->getCompressedTCarray();
$GLOBALS['TSFE']->initTemplate();
$GLOBALS['TSFE']->getConfigArray();
And you can get the configuration at:
$configuration =
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_yourextension_controller.'];
It's not really recommended, but it is doable.
Patrick
>
> let me explain,
>
> if you need typoscript AND you need eID,
> then you are out of luck.
>
> Usually if you need typoscript using some sort of Ajax call,
> then use a proper type number, it's not a lot slower
> then using typoscript within your eID (never made in serious
> measurements though...
>
> Depending on what you are doing, there are several solutions.
>
> What I did here http://www.cocktailsoftheworld.com/find-a-cocktail.html
> with
> my Ajax(eID calls it to prepare the complete list of ingredients and
> Cocktail
> names ands store them as a file. Then use that file within my eID.
>
> If that method can work for you, highly depends on what you are doing...
>
> Ries
>
>
>
>
>
>
>
>
>
More information about the TYPO3-dev
mailing list