[TYPO3-english] Re: Get all TypoScript in BE ?

Nemanja Todic tntprograms at gmail.com
Sat Aug 23 16:57:50 CEST 2014


Hi Hendrik

Please copy/paste this into your PHP file:

public function loadExtSettings($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();
        
        return $TSObj->setup;
}

Then call the function:
$somePageUid = 123;
$tsSetup = loadExtSettings ($somePageUid);

>> But i need to get the TS of any pages everywhere.
Typoscript can be different from page to page. Also it can be different if certain conditions are met etc. Therefore there is no "TS of all pages everywhere" but only TS for a particular page. This is why function "loadExtSettings" in previous example requires a page uid.

Hope this will help.

Regards
 


More information about the TYPO3-english mailing list