[TYPO3-english] Conditioanl constants in setup conditions
bernd wilke
t3ng at bernd-wilke.net
Wed Nov 13 16:35:57 CET 2013
Am 13.11.13 15:47, schrieb Stephan Schuler:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hey there.
>
>
> I just discovered something that costs me some CPU cycles. It’s related to having conditions in both, constants and setup that are tied closely.
>
>
> Let me show a short example:
>
>> Constants:
>>> [globalVar = GP:L = 0]
>>> config.language = en
>>> [globalVar = GP:L = 1]
>>> config.language = de
>>> [GLOBAL]
>>>
>> Setup:
>>> [LIT:{$config.language} = de|en$/]
>>> // Something that only is available for a configured set of languages, e.g. enabled solr cores.
>>> [GLOBAL]
>
>
> I think my use case is valid. See the TypoScript reference, pretty much at the end of "globalVar" examples.
> http://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#condition-globalvar
>
> There it says:
>> If the constant {$constant_to_turnSomethingOn} is "1" then this matches:
>>> [globalVar = LIT:1 = {$constant_to_turnSomethingOn}]
and why don't you use it like in the manual written?
there is a 'globalVar = ' in front of the LIT unlike your usage
and I don't know wether the '$/' at the end of your condition really is
intented as you will not get a match with this either
> The problem is rather complex, so I'm not going to explain what happened in detail. I will do that in a forge ticket if somebody else agrees to this being a bug.
PIBKAC ?
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list