[TYPO3-english] formatted tt_content for usage in extension (pdf generation multiple pages)
Mathias Schreiber [wmdb >]
mathias.schreiber at wmdb.de
Wed Mar 18 16:18:58 CET 2009
Gijs Epping schrieb:
> Mathias Schreiber [wmdb >] schreef:
>> PHP:
>> $conf['renderMe.']['select.']['pidInList(or so)'] = $pageId;
>> $content .=
>> $this->cObj->cObjGetSingle($conf['renderMe'],$conf['renderMe.']);
>
> Thanks mathias with your help i got it completely working in my
> extension without typoscript :)
Glad i could help.
> This is the solution.
>
> $rs = $GLOBALS['TYPO3_DB']->sql_query("SELECT * FROM tt_content WHERE
> colpos=0 AND deleted=0 AND hidden=0 AND pid IN(4,37)");
> while($rw = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($rs)){
>
> $cObj = &t3lib_div::makeInstance('tslib_cObj');
> $cObj->start($rw, 'tt_content');
>
> $content .= $cObj->cObjGetSingle('<' . 'tt_content', array());
> }
You do know that you do not take sorting into account?
And if you send a simple "order by sorting" within SQL you will get
something like this:
- Page 1 - CE 1
- Page 2 - CE 1
- Page 1 - CE 2
- Page 2 - CE 2
- Page 1 - CE 3
- Page 1 - CE 4
So you're only halfway there ;)
More information about the TYPO3-english
mailing list