[TYPO3-dev] condition on language

Stig Nørgaard Færch snf at dkm.dk
Sun Aug 15 16:05:45 CEST 2010


Den 14-08-2010 18:14, JoH asenau skrev:
>> this won't help as you can't access values in a condition which are
>> defined inside another condition. This belongs to the translation
>> from TS to PHP.
>> all TS except inside conditions is translated. this is the base for
>> all condition-tests. after the evaluation of all conditions all TS
>> inside the conditions is translated.
>> no chance to question a value which is not (re-)defined yet.
>
> So this one should be working and maybe it can help to modify it to the special needs of a plugin.
>
> temp.myPlugin = CASE
> temp.myPlugin {
>    key.cObject = TEXT
>    key.cObject {
>      lang {
>        de = doit
>        en = doit
>      }
>    }
>    default<  plugin.myPlugin
>    default {
>      #something here
>    }
>    doit<  plugin.myPlugin
>    doit {
>      #something else here
>    }
> }
>
> plugin.myPlugin>
> plugin.myPlugin<  temp.myPlugin

Yes, this could be a solution.
I'm just wondering about if the overhead would be a problem. I mean 
copying the whole array for the extension as many times as I need to 
define something for a language.
I'm wondering if creating my own user function for conditions could 
solve this in a better way?

/Stig




More information about the TYPO3-dev mailing list