[TYPO3-dev] virtual cObjects & change ts rendering

Alexandre Gravel-Raymond a.gravel-raymond at alienor.net
Tue Jul 12 09:33:50 CEST 2011


Hi Stefan,

Le 11/07/2011 15:18, Stefan Beylen a écrit :
> I am able to render cObjects in my extension the following way:
>
> $data['CType']='text';
> $data['header']=$record[0]['title'];
> $data['bodytext']=$description;
> $cObj =t3lib_div::makeInstance('tslib_cObj');
> $cObj->start($data, '_NO_TABLE');
> $content=$cObj->cObjGetSingle("<tt_content",'');
>
> now I got the problem that I do not want the bodytext part to be parsed
> as RTE content, so additionally I would like to influence Typoscript and
> also add the following line just within the content that is parsed out
> of my extension: tt_content.text.20.parseFunc >
>
> is there some way to achieve that?


One possibility would be to first retrieve the typoscript Array and then 
remove tt_content.text.20.parseFunc from it, before calling 
cObjGetSingle. For instance :

$type = $GLOBALS['TSFE']->tmpl->setup['tt_content'];
$conf = $GLOBALS['TSFE']->tmpl->setup['tt_content.'];
unset($conf['text.']['20.']['parseFunc.']);
$content = $cObj->cObjGetSingle($type, $conf);

I didn't test it but something like that should do the job.

Alexandre Gravel-Raymond







More information about the TYPO3-dev mailing list