[TYPO3-german] Condition in TS richtig setzen

Marc Willmann typo3 at marc-willmann.de
Wed Mar 4 17:31:23 CET 2015


geht's Dir um die unterschiedliche Syntax Deiner if/else bzw. logical
OR-Verknüpfung?

Oder um die korrekte Abfrage der Bedingung?

Vielleicht hilft Dir
http://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#condition-hostname
weiter.

Übrigens kennen die Conditions auch Wildcards, das macht's vielleicht
noch etwas übersichtlicher.

[hostname = *.xxx.de]
[globalString = IENV:HTTP_HOST = *xxx.de]


http://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/Syntax/Conditions/Index.html

sagt

[ condition 1 ][ condition 2]

(Some TypoScript only parsed if condition 1 or condition 2 are met.)

[GLOBAL]

(also kein '||' - obwohl ich mir sicher bin, das auch schon benutzt zu
haben....)

Ansonsten, wenn Conditions nicht ziehen: Den Klassiker, dass Conditions
nicht in verschachtelten Strukturen liegen dürfen, hast Du geprüft?

Marc

Am 04.03.15 17:07, schrieb Christian Leicht:
> Ja, das hatte ich auch gemacht, aber es funktioniert nicht richtig.
> Ich kann in der TYPO3 Dokumentation diese Variante auch nicht finden.
> In manchen Useranleitungen und Blogs schon.
> Bin mir da ganz unsicher
> 
> Christian
> 
> Am 04.03.2015 um 16:53 schrieb Marc Willmann:
>> sollte alles gehen und logisch dasselbe sein, sofern xxx.de, www.xxx.de,
>> xxx.com und www.xxx.com ALLE Domains sind, die auf diese Seite verweisen.
>>
>> ich präferiere
>>> [...] || [...]
>>> [ELSE]
>>> [GLOBAL]
>>
>> weil ich es für am einfachsten Lesbar halte, aber darüber kann man
>> Glaubenskriege führen. :)
>>
>> Marc
>>
>> Am 04.03.15 16:46, schrieb Christian Leicht:
>>> Hallo,
>>>
>>> ich muss für ein formhandler Formular eine Weiche für 2 Domains/Sprachen
>>> einbauen und habe mit Google widersprüchliche Condition Verwendungen
>>> gefunden.
>>>
>>>
>>> Zur Zeit benutze ich folgendes:
>>>
>>> [globalString = IENV:HTTP_HOST = www.xxx.de]||[globalString =
>>> IENV:HTTP_HOST = xxx.de]
>>>
>>>      plugin.Tx_Formhandler.settings { ...
>>>
>>> [ELSE]
>>>
>>>      plugin.Tx_Formhandler.settings { ...
>>>
>>> [GLOBAL]
>>>
>>>
>>> Im Web habe ich aber auch folgende Möglichkeit gefunden:
>>>
>>> [globalString = IENV:HTTP_HOST = www.xxx.de, IENV:HTTP_HOST = xxx.de]
>>>      plugin.Tx_Formhandler.settings { ...
>>> [ELSE]
>>>      plugin.Tx_Formhandler.settings { ...
>>> [GLOBAL]
>>>
>>>
>>>
>>> Oder soll ich die 2. Sprachversion auch noch angeben, also:
>>>
>>> [globalString = IENV:HTTP_HOST = www.xxx.de]||[globalString =
>>> IENV:HTTP_HOST = xxx.de]
>>>      plugin.Tx_Formhandler.settings { ...
>>> [globalString = IENV:HTTP_HOST = www.xxx.com]||[globalString =
>>> IENV:HTTP_HOST = xxx.com]
>>>      plugin.Tx_Formhandler.settings { ...
>>> [GLOBAL]
>>>
>>> Was ist denn die richtige Variante?
>>>
>>> Besten Dank für Hilfe
>>>
>>> Christian
>>> _______________________________________________
>>> TYPO3-german mailing list
>>> TYPO3-german at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
>>
>>
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german


-- 
Marc Willmann. TYPO3-Freelancer.
http://www.marc-willmann.de

Seelandstr. 14-16
D-23569 Lübeck

TYPO3 Certified Integrator


More information about the TYPO3-german mailing list