[pass global=query] and check for ommitted parameter
-
How do I check if a parameter in the query string is there or not? I tried this, but it doesn’t work:
[pass global='query' fields='myseries'] |{MYSERIES}| [if field='{MYSERIES}']DEFINED[else]UNDEFINED!!![/if]
If my URL looks like: https://mysite/mypage?myseries=XYZ, I get XYZ printed as expected, but the [if] falls to UNDEFINED!!!
If my URL looks like: https://mysite/mypage?myseries=, I get || printed as expected, but the [if] falls to UNDEFINED!!!
If my URL looks like: https://mysite/mypage, I get || printed as expected, but the [if] falls to UNDEFINED!!!
I’m not clear on what the syntax to check for (1) the existence of the parameter, and (2) that the parameter value is not empty. Help!
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[pass global=query] and check for ommitted parameter’ is closed to new replies.