[TYPO3-dev] BE lib
Ingo Renner
typo3 at ingo-renner.com
Tue May 15 15:11:14 CEST 2007
Popy wrote:
> The main difficulty to have the TS or a cObject is that you must initialise
> a TSFE
if you only need it to get some TS value this can be done way shorter:
// get the current page ID
$thePageId = $params['row']['pid'];
$template = t3lib_div::makeInstance('t3lib_tsparser_ext');
// do not log time-performance information
$template->tt_track = 0;
$template->init();
$sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
$rootLine = $sys_page->getRootLine($thePageId);
// generate the constants/config + hierarchy info for the template.
$template->runThroughTemplates($rootLine);
$template->generateConfig();
// get value for the path containing the template files
$readPath = t3lib_div::getFileAbsFileName(
$template->setup['plugin.']['tx_ttaddress_pi1.']['templatePath']
);
Ingo
More information about the TYPO3-dev
mailing list