[Typo3-dev] rendering content by id

Kraft Bernhard kraftb at gmx.net
Thu Jun 16 10:32:21 CEST 2005


Robert Fink wrote:
> Hi!
> 
> In an extension i need to recursively generate the HTML-code of the pages 
> below one certain page. I know how to traverse the pagetree recursively, but 
> i have no idea how to effectively generate the HTML-code for that pages.
> 

Well ... I have to do the same thing for my new coming OWN page (now it comes that far.)


I think that I will do it the following way:
Let a plugin recurse the page tree.
There is TS defined for my plugin:

plugin.tx_myplugin_pi1 {
	page = PAGE
	page.10 = TEMPLATE
	blabla
}

And then I would do the following:
Save "$HTTP_GET_VARS['id']" and $GLOBALS['TSFE'] to some temporary variables ... then
do the following for each page:

-----------------snip---------------

$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.']);

-----------------snip---------------

then the complete content of the page will be in $content ....

you can set some TS in the page Object defining the page to be rendered which decides if the <head>
section is generated or not ...

I for example will not need a head section nor body tags as all those single pages get assembled in
one huge page ...
If you want to do something similar let me know then we could combine our efforts ....


PS: Remember that all this is untested and just a thought how it could work ...

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