Is there a way to use Typoscript condition to assign a different value to a TypoScript TEXT if a GET variable is empty ?
Something like that :
xxxx.1 = TEXT
[globalVar = GP:print != ""]
xxxx.1.value = Absent
[else]
xxxx.1.value = Present
[end]
Of course here the != ""
doesn't work, so what should I use instead ?
Here is an example with "if":
1 = TEXT
1 {
value = Absent
override = Present
override.if {
isTrue.data = GP:print
}
}
With globalString it's also possible to use a Regular Expression as comparison. Depending on the context this might also be a viable solution.
[globalString = GP:test = /.+/]
# This is only evaluated if GP:test contains one or more characters
[global]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With