[TYPO3-german] Eigene Variable über TS abfragen
Sven Brockshus
sven at brockshus.de
Thu Feb 23 14:12:32 CET 2012
sorry, wenn ich so spät nochmal nachfrage... aber hattest du das hin
bekommen?
bei meinem test siehts so aus:
***schnipp***
temp.kontrast = TEXT
temp.kontrast {
[globalString = _COOKIE|type = 112]
value = Kontrasttest 98
typolink.parameter.data = TSFE:id
typolink.ATagParams = onClick="document.cookie = 'type=98';"
[globalString= HTTP_COOKIE_VARS | type=98]
value = Kontrasttest 112
typolink.parameter.data = TSFE:id
typolink.ATagParams = onClick="document.cookie = 'type=112';"
[ELSE]
value = elseTest - 112
typolink.parameter.data = TSFE:id
typolink.ATagParams = onClick="document.cookie = 'type=112';"
[END]
***schnapp***
ich habe unter Typo3 4.5.3 bisher mit globalVar und globalString
experimentiert. und auch schon die "kurzform" _COOKIE ausprobiert.
nach meinen inet-recherchen sollte alles klappen, tuts aber nicht.
es wird immer nur die [else] condition angezeigt! das setzen des cookies
klappt und ich kann auch darauf zugreifen.
da hab ich in der liste gekramt und dein altes posting gefunden :-)
evtl. hat auch auch jemand anders eine idee?!?
thx und gruß svenna
Am 15.08.2011 14:51, schrieb ulrich:
> Wenn ich ohne Variable arbeite und versuche den Wert über globalVar
> abzufragen, erhalte ich als Resultat auch immer ein Nein. Obwohl ich
> ein Cookie mit Wert 1 habe.
>
> TS Setup:
> [globalVar = HTTP_COOKIE_VARS | myCookie|foo|bar=1]
> subparts.test = TEXT
> subparts.test.value = Ja
> [else]
> subparts.test = TEXT
> subparts.test.value = Nein
> [global]
>
> Hat vielleicht jemand in dieser Honsicht einen Tipp?
>
>
> Viele Grüße
> - Ulrich
> Am 15. August 2011 14:01 schrieb ulrich<good945 at gmail.com>:
>> Hallo Liste,
>>
>> ich hab hier folgendes Problem: Ich möchte anhand einer Variable
>> entscheiden, welcher Inhalt von Typo3 angezeigt wird. Nun ist aber
>> meine Variable ein Wert aus einem Cookie, den ich über TS abfragen
>> möchte. (Der Wert ist 0 oder 1 im Cookie).
>>
>> hier meine TS:
>> (Constants)
>> myVar.data = global:HTTP_COOKIE_VARS|myCookie|foo|bar
>>
>> (Setup)
>> [globalVar= myVar=1]
>> subparts.test.value = Ja
>> [else]
>> subparts.test.value = Nein
>> [global]
>>
>> Typo3 sagt mir nun IMMER "Nein".
>>
>> Was mach ich denn falsch?
>>
>> Grüße
>> - Ulrich
>> _______________________________________________
>> 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
More information about the TYPO3-german
mailing list