[Typo3-dev] Using values from TS setup in extension (in BE and FE)

Oliver Klee typo3-german-01 at oliverklee.de
Sat Nov 26 14:29:10 CET 2005


Hi all,

Oliver Klee schrieb:
> for my "seminars" extension, I'd like to use some values from the TS
> setup both in the FE plug-in as well as in the BE module (I need the
> date format which the user should need to configure only once). So far,
> I haven't found a way to access those values from the BE. How can I do this?

Thanks a lot for all the help. I now have a working solution that looks
like this:

1. Move the setup from ext_typoscript_setup.txt to static/setup.txt

2. If we are in the BE, access the setup like this:

// On the back end, we need to create our own template setup.
$template = t3lib_div::makeInstance('t3lib_TStemplate');
// do not log time-performance information
$template->tt_track = 0;
$template->init();

// Get the root line
$sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
// the selected page in the BE is found
// exactly as in t3lib_SCbase::init()
$rootline = $sys_page->getRootLine(intval(t3lib_div::_GP('id')));

// This generates the constants/config + hierarchy info for the template.
$template->runThroughTemplates($rootline, 0);
$template->generateConfig();

$this->conf = $template->setup['plugin.']['tx_'.$this->extKey.'.'];


(I could have used $this->id instead of intval(t3lib_div::_GP('id')) as
well.)

Greets,


Oliver




More information about the TYPO3-dev mailing list