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

Peter Klein peter at clioonline.dk
Mon May 3 09:40:49 CEST 2010


Hi Stano.

Your code is almost identical to mine, and doesn't change anything. :(

>From what I can see, then there's no setup['plugin.'] array. 
The only thing the "setup" object contains, is some typoscript for a
ajax page (typeNum=52) which  is used by another extension.

I can access setup_constants['plugin.'] but that is the constants of
the plugin, not the actual setup.

--
Peter Klein / Clio Online


On Thu, 29 Apr 2010 16:13:24 +0200, Stano Paška
<stano.paska at gmail.com> wrote:

>Hi Peter,
>
>I use this code (from ql_googlemap_selector plugin):
>
>function loadTS($pageUid) {
>	$sysPageObj = t3lib_div::makeInstance('t3lib_pageSelect');
>	$rootLine = $sysPageObj->getRootLine($pageUid);
>	$TSObj = t3lib_div::makeInstance('t3lib_tsparser_ext');
>	$TSObj->tt_track = 0;
>	$TSObj->init();
>	$TSObj->runThroughTemplates($rootLine);
>	$TSObj->generateConfig();
>	$this->conf = $TSObj->setup['plugin.']['ql_googlemap_selector.'];
>}
>
>I think that t3lib_tsparser_ext class has ability to load external TS files...
>
>Stano.
>
>
>On Thu, Apr 29, 2010 at 3:38 PM, Peter Klein <peter at clioonline.dk> wrote:
>> 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;
>>>}
>> _______________________________________________
>> TYPO3-dev mailing list
>> TYPO3-dev at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>>




More information about the TYPO3-dev mailing list