[TYPO3-dev] How do I access Typoscript Setup from a BE Module?

Peter Klein peter at clioonline.dk
Thu Apr 29 15:38:48 CEST 2010


Hi Oliver.

Your code is (almost) identical to mine, so unfortunatly that won't
help. :(

I think the problem is because my TS setup is located in external
files, which are loaded using:

<INCLUDE_TYPOSCRIPT: source="FILE:blabla.ts">

And it looks like the code we both are using, doesn't read the TS code
from the external files. :(

I really find it stupid to have to define idenrtical config settings
in both TS setup and TSConfig, in order for FE plugin and BE modules
to have the same settings.

--
Peter Klein / Clio Online.

On Thu, 29 Apr 2010 14:38:18 +0200, Oliver Klee
<typo3-german-02 at oliverklee.de> wrote:

>protected function retrievePageConfig($pageId) {
>	$template = t3lib_div::makeInstance('t3lib_TStemplate');
>	// Disables the logging of time-performance information.
>	$template->tt_track = 0;
>	$template->init();
>
>	$sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
>
>	// Gets the root line.
>	// Finds the selected page in the BE exactly as in t3lib_SCbase::init().
>	$rootline = $sys_page->getRootLine($pageId);
>
>	// Generates the constants/config and hierarchy info for the template.
>	$template->runThroughTemplates($rootline, 0);
>	$template->generateConfig();
>
>	if (isset($template->setup['plugin.']['tx_'.$this->extKey.'.'])) {
>		$result = $template->setup['plugin.']['tx_' . $this->extKey . '.'];
>	} else {
>		$result = array();
>	}
>
>	return $result;
>}




More information about the TYPO3-dev mailing list