[Typo3] how to get FE TS into BE Module
Arco
arco at appeltaart.mine.nu
Sat May 21 12:58:06 CEST 2005
Robert Lemke wrote ..
> Generally, the TS templates are not meant to be parsed by BE modules, you
> would use page TSconfig instead. But in your case it makes sense - and
> it
> is possible by using the TS parser directly.
> require_once (PATH_t3lib.'class.t3lib_page.php');
> require_once (PATH_t3lib.'class.t3lib_tstemplate.php');
> require_once (PATH_t3lib.'class.t3lib_tsparser_ext.php');
>
> $pageUid = 1234; // You need to set the page id, if it's a web BE module,
> //just use $this->id
>
> $sysPageObj = t3lib_div::makeInstance ('t3lib_pageSelect');
> $rootLine = $sysPageObj->getRootLine ($pageUid);
>
> $templateObj = t3lib_div::makeInstance('t3lib_tsparser_ext');
> $templateObj->tt_track = 0;
> $templateObj->init();
> $templateObj->runThroughTemplates ($rootLine);
> $templateObj->generateConfig();
Thank you!
you just answered a frustrating question!
Arco
More information about the TYPO3-english
mailing list