[TYPO3-templavoila] How to access a translated page title in extension?

Anders Tillbeck at at opengate.dk
Fri Apr 20 13:21:01 CEST 2007


Dmitry Dulepov skrev:
> Anders Tillbeck wrote:
>> After using the TemplaVoila to translate at site to multible languages 
>> I have now a small problem. I have made an extension that can list 
>> page titles using these fields:
>>
>> $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page );
>> $details['title'];
>>
>> But using it on a page with multible languages made using TemplaVoila 
>> my extension only selects the "real" page title and not the tranlated 
>> page title for any secondary language.
>>
>> How can I change the above TS to get the true translated page title 
>> instead of the default page title?
> 
> This is not depended on templavoila. You need to make this call:
> 
> $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, $curLang);
> 
> where $curLang is language ID (value of "L").
> 


Thanks for your fast answer :-)

I have tried:
$details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page );
$GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, 1);
This writes out "Array"

$details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page );
$GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, 1);
This wries out the original page title. But not the one for translation &L=1

You seem to know this well so I hope that you can see what to do 
different in the above two examples to get the translated title :-)

BR. Anders


More information about the TYPO3-project-templavoila mailing list