[Typo3] Using CONTENT obj from PHP
media.res | alex widschwendter
a.widschwendter at mediares.at
Wed May 11 15:59:02 CEST 2005
hi elmar,
> I want to output the content of the main column of all direct
> child-pages together on the parents page, that means in the same order
> as child pages are sorted.
>
> I think this a typical task for a loop. Because TS doesn't supports
> programming of loops, I want to do it in a PHP-Skript. In the very heart
> of the loop it should work with the well known CONTENT-object of TS, to
> parse all content types in the appropriate way.
Try to make a cObj and use the CONTENT() method from it.
$cObj = t3lib_div::makeInstance("tslib_cObj");
$conf = array('table' => 'tt_content',
'select.' => array('pidInList' => $pidList,
'orderBy' => 'sorting')
);
$renderedContent = $cObj->CONTENT($conf);
This is the same as the "CONTENT" object in TS, so the configuration
is the same as described in:
http://typo3.org/documentation/document-library/doc_core_tsref/CONTENT-1/
hth alex
More information about the TYPO3-english
mailing list