[Typo3-dev] content rendering ofr the frontend

Sylvain Viart sylvain at ledragon.net
Fri Sep 10 18:09:30 CEST 2004


Hi,

After retrieving a content record with some API call, I would like to 
know which function is best suited to render my content, basically as 
any other content in the site, using my current Template configuration.

I'm guessing I've missed some nice API function.

I'm managing content output in PHP:

Here how, I get the correct content record:

> function getImageList() {
>       global $TSFE;
>       $BE_userId = $this->_be_to_fe_user();
> 
>       $theTable = 'pages';
>       $theField = 'perms_userid';
>       $theValue = $BE_userId;
> 
>       $page_records = $TSFE->sys_page->getRecordsByField($theTable,
>          $theField,$theValue);
> 
>       $theTable = 'tt_content';
>       $theField = 'pid';
>       $theValue = $page_records[0]['uid'];
> 
>       $page_content_records = $TSFE->sys_page->getRecordsByField($theTable,
>          $theField,$theValue);
> 
>       return $page_content_records[0];
>    }


Now I would like to have the image content record to be drawn as it is 
when I normally hit the page which hold this record.

I've found the class tslib_cObj, with some method, but I don't want to 
have to iterate in the image list or nothing, just to have some code like:

$template_config = $TSFE->the_good_parameter_to_get_my_current_config;
$setup = $template_config + ?? + $this->getImageList();
$my_cObj->cObjGet($setup);

Of course the plus sign means API call, I'm a bit lost. :-\
-- 
Regards,
Sylvain Viart (France)
TYPO3 DocTEAM.




More information about the TYPO3-dev mailing list