One way to render a tt_content element from own extension is this:
function getCE($id)
{
$conf['tables'] = 'tt_content';
$conf['source'] = $id;
$conf['dontCheckPid'] = 1;
return $this->cObj->cObjGetSingle('RECORDS', $conf);
}
Is it possible to add something to $conf so tt_content is rendered localized? Lets say I want the tt_content row with sys_language_uid = 2.
Alternative is to use the "getRecordOverlay", but then some functionality from cObjGetSingle will be lost.
UPDATE (it is for TYPO3 4.5.10)
Thank you for feedback. I somehow do it wrong with the 'CONTENT' way of doing it. I get nothing back from the function. Neither with or without the languageField.
Is it possible to post a working example? Lets say I know the tt_content uid is 3389 and it has been translated to language with uid 2. Or a link to a simple working example.
$conf = array(
'table' => 'tt_content',
'select.' => array(
'where' => 'colPos=0 AND uid = 3389',
'orderBy' => 'sorting',
'languageField' => 2 << if I leave this line out of the conf array I still get no result
)
);
return $this->cObj->cObjGetSingle('CONTENT', $conf);
BR. Anders