[TYPO3-dev] TSFE in BE Module

Ingo Renner ingo at typo3.org
Thu Jan 31 12:19:09 CET 2008


Stas Kobzar wrote:

hi Stas,

> I am working on BE module, and I thought it would be nice to have some FE
> $GLOBALS['TSFE'] values in BE module.
> Does someone know if it is possible to get this values (like TS tamplate
> setup/constants ) to BE module? How to do that?

in BE you can simply initialize a TSFE instance yourself like this:

	// get a TS parser instance
$template = t3lib_div::makeInstance('t3lib_tsparser_ext');
$template->tt_track = 0;
$template->init();

$sysPage  = t3lib_div::makeInstance('t3lib_pageSelect');
$rootLine = $sysPage->getRootLine($pageId);

	// generate the constants/config + hierarchy info for the template.
$template->runThroughTemplates($rootLine);
$template->generateConfig();

return $template->setup;


HTH
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2




More information about the TYPO3-dev mailing list