[TYPO3-dev] get lg_typo3 with sys_language_uid

Steffen Kamper info at sk-typo3.de
Sun Nov 23 19:16:37 CET 2008


hi,

Thomas Allmer schrieb:
> 
> Thomas Allmer wrote:
>> I played a little bit around with the db... it works but it's not nice...
>>
> 
> ok I solved it with a different approach, it still not the nicest way but it
> always works...
> 

in BE t3lib_eFunc is your friend, see
t3lib_beFunc::getSystemLanguages()


> Another question:
> 
> is there any possibility to get the current templateTSconfig in the BE? (I
> have the pagId)
> 
> as now I had to introduce another pageTS variable (template_default_lang =
> de) as I couldn't get the setupTS variable config.language [it should have
> the same value]
> 
> so if anyone wants to set the default language to 'de' he needs to set it in
> 2 place which is definitely confusing... but I couldn't find another way...

get the TS:
function loadTS($pageUid) {
         $sysPageObj = t3lib_div::makeInstance('t3lib_pageSelect');
         $rootLine = $sysPageObj->getRootLine($pageUid);
         $TSObj = t3lib_div::makeInstance('t3lib_tsparser_ext');
         $TSObj->tt_track = 0;
         $TSObj->init();
         $TSObj->runThroughTemplates($rootLine);
         $TSObj->generateConfig();
         return $TSObj->setup;
}

get tsConfig:
t3lib_beFunc::getPagesTSconfig

vg Steffen




More information about the TYPO3-dev mailing list