[TYPO3-german] Typoscript: config.sys_language_uid innerhalb SELECT

Bjoern Pedersen bjoern.pedersen at frm2.tum.de
Tue Dec 14 13:19:38 CET 2010


Am 14.12.2010 12:57, schrieb Stephan Vidar:
> Am 14.12.2010 10:57, schrieb Stephan Vidar:
>> Hallo zusammen,
>>
>> ich suche nach einer Möglichkeit innerhalb eines SELECT's im Typoscript
>> den aktuellen Wert von config.sys_language_uid zu benutzen. Hat jemand
>> eine Idee, wie das gehen könnte?
>>
>> Gruß, Stephan
>>
>> Typoscript:
>> -----------
>> tmp = CONTENT
>> tmp {
>> table = tt_content
>> select {
>> where = sys_language_uid = *config.sys_language_uid*
>> orderBy = tstamp DESC
>> pidInList = 1
>> recursive = 10
>> max = 1
>> }
>>
>> ...
>> }
> 
> 
> Hab eine Lösung über andWhere gefunden, denn da ist ein stdWrap bzw.
> dataWrap möglich:
> 
> tmp = CONTENT
> tmp {
>   table = tt_content
>   select {
>     andWhere.dataWrap = sys_language_uid = {TSFE:sys_language_uid}
>     orderBy = tstamp DESC
>     pidInList = 1
>     recursive = 10
>     max = 1
>   }
> 
>   ...
> }
Select kennt das Feld languageFied: (
http://wiki.typo3.org/wiki/TSref/select)

languageField 	string 	If set, this points to the field in the record
which holds a reference to a record in sys_language table. And if set,
the records returned by the select-function will be selected only if the
value of this field matches the $GLOBALS[“TSFE”]->sys_language_uid
(which is set by the config.sys_language_uid option)

also einfac select{
  ....
  languageField=sys_language_uid

}

Björn


More information about the TYPO3-german mailing list