[TYPO3-english] [solved] [6.2.5] How to? condition with string comparision of a constant (in page setup typoscript)

Patrick Bierans patrick at bierans.de
Wed Oct 15 12:38:42 CEST 2014


Got it:

1) The typoscript object browser does not care about the constants and
contitions when displaying the setup automatically :(
   -> You explicitly have to tell which conditions to be true - how unfortunate.

2) solution was: [globalVar = LIT:{$config.preset} = dev]

I was able to see it working after outputting the settings with the PAGE object.

page = PAGE
page.typeNum = 0
page.10 = TEXT
page.10.value < config.presettest
~

Stay cool, don't close the fridge.

> Patrick Bierans <patrick at bierans.de> hat am 15. Oktober 2014 um 12:23
> geschrieben:
> 
> 
> Hello Community!
> 
> 
> After years in typo3 4.6 I decided to look at a fresh new 6.2.5.
> Right now I think I missed something and wanted to ask you.
> 
> 
> My constant for the root page (web > template) is:
> 
> # cat = basic/presets; type = options[dev,stage,prod]; label = enviroment
> preset
> config.preset = dev
> ~
> 
> Based on the constant I want to change the page setup:
> 
> # to see the constant in the typo script object browser:
> config.preset = {$config.preset}
> 
> # this has to change now:
> config.presettest = idontknow
> 
> # How do I have to write this condition so it works?
> [globalString = {$config.preset} = dev]
>   config.presettest = devenv
> [global]
> ~
> 
> I tried different interations with globalVar and LIT: 
> and switched the operants but something seems wrong in general.
> 
> What am I missing?
> 
> 
> TIA!
> 
> Patrick
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list