Typoscript-Conditions
This will match with a url like "...&print=1"
[globalVar = GP:print > 0]
This will match with an url like "...&tx_ext_pi1[var1]=1"
[globalVar = GP:tx_ext_pi1|var1 > 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}]
This will match with netscape and opera-browsers
[browser = netscape, opera]
This will match if any BE-user is logged in:
[globalVar = TSFE : beUserLogin > 0]
This matches logins from users members of groups with uid's 1 and/or 2:
[usergroup = 1,2]
This will match on any FE-user (because every FE-user has an usergroup)
[usergroup = *]
better:
[loginUser = *]
This matches logins from special users uid's fe_users-uid1 and/or fe_users-uid2, ...:
[loginUser = fe_users-uid1, fe_users-uid2, ...]
This checks if one of the figures in "pages-uidl" is a PID (pages-uid) in the rootline:
[PIDinRootline = pages-uid, pages-uid, ...]
Do the same as PIDinRootline, except the current page-uid is excluded from check.
[PIDupinRootline = pages-uid, pages-uid, ...]
This checks the domain in two ways. As the first does not really work I prefer the second:
[hostname = mydomain.tld] || [globalString = IENV:HTTP_HOST = mydomain.tld]
This ends any conditions:
[end]
or this:
[global]
Es ist nicht möglich Conditions von Werten, die in vorgehenden Conditions gesetzt werden abhängig zu machen:
folgendes funktioniert nicht !
# default-Konfiguration
config.sys_language_uid = 0
config.language = en
config.locale_all = en_EN
config.htmlTag_langKey = en
[globalVar = GP:L = 1]
# Konfiguration wenn &L=1 angegeben
config.sys_language_uid = 1
config.language = de
config.locale_all = de_DE
config.htmlTag_langKey = de
[global]
:
:
# Versuch obiges Setzen von sys_language_uid abzufragen:
[globalVar = TSFE:sys_language_uid = 1]
hier kommt man niemals hin, auch wenn die Abfrage grundsätzlich möglich ist und abgefragt werden kann.
[global]
Anmerkung:
in Extensions ist das Abfragen der GET-Variablen t3lib_div::_GP('L') zum Bestimmen der Sprache eher verkehrt.
Dort sollte man immer auf $GLOBALS['TSFE']->sys_language_uid zurückgreifen um zu bestimmen welcher übersetzte Datensatz gerade benutzt werden soll.