Zum Inhalt springen

URL: Variablen auslesen / auswerten

Erstellt am 26. November 2002 · 2 Antworten · letzte Antwort am 26. November 2002

Tags: Frage

Andrej ·

hallo,

wie kann ich in TS auf die variablen der aufrufenden url zugreifen ?

folg. will ich tun:

* typeNum Wert aus aktueller URL holen
* if typeNum = 4 dann XXX
* if typeNum = 1 dann YYY

danke!

Blacky ·

Hi Andrej,

S. 29, 42 TSRef.pdf

Examples:
This will match with a url like “...&print=1”
[globalVar = GP:print > 0]
This will match with a remote-addr begining with “192.168.”
[globalString = ENV:REMOTE_ADDR = 192.168.*]
This will match with the page-id being higher than 10:
[globalVar = TSFE:id > 10]
This will match with the pages having the layout field set to “Layout 1”:
[globalVar = TSFE:page|layout = 1]
If the constant {$constant_to_turnSomethingOn} is “1” then this matches:
[globalVar = LIT:1 = {$constant_to_turnSomethingOn}]

in Deinem Fall wäre das wohl
[globalVar = GP:type=4]
...
[else]
...
[end]
...

Gruss

Andreas Schwarzkopf
http://www.meinsystem.de

Andrej ·

merci!
das sieht ja gut aus.

jetzt habe ich das tsref bestimmt schon 3 mal gelesen (echt!), und diesen passus trotzdem übersehen.

danke...