[Typo3-dev] rendering content by id

Kraft Bernhard kraftb at gmx.net
Thu Jun 16 10:52:07 CEST 2005


Kraft Bernhard wrote:
> $HTTP_GET_VARS['id'] = $temp_page_id;
> $TSFE = new $temp_TSFEclassName(
>       $TYPO3_CONF_VARS,
>       t3lib_div::_GP('id'),       
>       t3lib_div::_GP('type'),
>       t3lib_div::_GP('no_cache'),
>       t3lib_div::_GP('cHash'),
>       t3lib_div::_GP('jumpurl'),
>       t3lib_div::_GP('MP'),
>       t3lib_div::_GP('RDCT')
>    );
> $content = $this->cObj->cObjGetSingle($this->conf['page'], 
> $this->conf['page.']);

Just investigated it a little more ... I think it shall be sufficient to do the following things:

$temp_copy_TSFE = $GLOBALS['TSFE']; // store original TSFE
$GLOBALS['TSFE']->id = $GLOBALS['TSFE']->contentPid = $PAGE_TO_RENDER_ID;
$GLOBALS['TSFE']->getPageAndRootlineWithDomain($GLOBALS['TSFE']->config['config']['content_from_pid_allowOutsideDomain']?0:$GLOBALS['TSFE']->domainStartPage);
$pageContent = $GLOBALS['TSFE']->cObj->cObjGet($this->conf['page.']);
$GLOBALS['TSFE'] = $temp_copy_TSFE;	// Restore original TSFE
// Content in "pageContent"


greets,
Bernhard
-- 
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50




More information about the TYPO3-dev mailing list