%[if %("%id=condition%" == "webpage_link_has_any_query_string")% ]%
If the webpage link has any query string
%[endif]%
%[if %("%id=condition%" == "webpage_link_has_no_query_string")% ]%
If the webpage link has no query string
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to")% ]%
If the webpage link has a key equal to %id=query_key%
%[endif]%
%[if %("%id=condition%" == "key_is_not_equal_to")% ]%
If the webpage link has a key not equal to %id=query_key%
%[endif]%
%[if %("%id=condition%" == "key_starts_with")% ]%
If the webpage link has a key that starts with %id=query_key%
%[endif]%
%[if %("%id=condition%" == "key_ends_with")% ]%
If the webpage link has a key that ends with %id=query_key%
%[endif]%
%[if %("%id=condition%" == "value_is_equal_to")% ]%
If the webpage link has a value equal to %id=query_value%
%[endif]%
%[if %("%id=condition%" == "value_is_not_equal_to")% ]%
If the webpage link has a value not equal to %id=query_value%
%[endif]%
%[if %("%id=condition%" == "value_is_less_than")% ]%
If the webpage link has a value less than %id=query_value%
%[endif]%
%[if %("%id=condition%" == "value_is_more_than")% ]%
If the webpage link has a value more than %id=query_value%
%[endif]%
%[if %("%id=condition%" == "value_is_less_than_or_equal_to")% ]%
If the webpage link has a value less-than or equal to %id=query_value%
%[endif]%
%[if %("%id=condition%" == "value_is_more_than_or_equal_to")% ]%
If the webpage link has a value more-than or equal to %id=query_value%
%[endif]%
%[if %("%id=condition%" == "value_is_between_range_of")% ]%
If the webpage link has a value between the range of %id=query_range[0]% and %id=query_range[1]%
%[endif]%
%[if %("%id=condition%" == "value_is_outside_range_of")% ]%
If the webpage link has a value outside the range of %id=query_range[0]% and %id=query_range[1]%
%[endif]%
%[if %("%id=condition%" == "value_starts_with")% ]%
If the webpage link has a value starting with %id=query_value%
%[endif]%
%[if %("%id=condition%" == "value_ends_with")% ]%
If the webpage link has a value ending with %id=query_value%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_equal_to")% ]%
If the webpage link has both a key of %id=query_key% and a value of %id=query_value%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_not_equal_to")% ]%
If the webpage link has a key equal to %id=query_key% but a value not equal to %id=query_value%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_less_than")% ]%
If the webpage link has a key equal to %id=query_key% but a value less-than %id=query_value%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_more_than")% ]%
If the webpage link has a key equal to %id=query_key% and a value more-than %id=query_value%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_less_than_or_equal_to")% ]%
If the webpage link has a key equal to %id=query_key% and a value less-than or equal to %id=query_value%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_more_than_or_equal_to")% ]%
If the webpage link has a key equal to %id=query_key% and a value more-than or equal to %id=query_value%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_between_ranges_of")% ]%
If the webpage link has a key equal to %id=query_key% and a value between the range of %id=query_range[0]% and %id=query_range[1]%
%[endif]%
%[if %("%id=condition%" == "key_is_equal_to_and_value_is_outside_ranges_of")% ]%
If the webpage link has a key equal to %id=query_key% and a value outside the range of %id=query_range[0]% and %id=query_range[1]%
%[endif]%
%[endif]%
%%[[endif]]%%
A typical link might have a key / value pair appended onto it like this:
https://example.com/products/latest/
?key=value
More complicated links could have multiple key / value pairs appended, with each separated with an ampersand. QueryDisplay is able to query them all:
https://example.com/products/latest/
?key=value&key=value&key=value&key=value
In the real world, a link we can query against could look something like this:
https://example.com/products/latest/
?widget_stock_level=12
Depending on the setup of your test condition, key and value, we can return different results:
Test Condition | Test Key | Test Value | Returned Condition (Result) |
Key Is Equal To |
widget_stock_level |
|
true |
Key Is Equal To |
favourite_widgets |
|
false |
Key Starts With |
widget_ |
|
true |
Value Is Less Than |
|
24 |
true |
Value Is Less Than |
|
12 |
false |
Value Is Less Than Or Equal To |
|
12 |
true |
Value Is More Than |
|
14 |
false |
Value Is Between Range Of |
|
10 and 20 |
true |
Key Is Equal To And Value Is Equal To |
stock_level |
12 |
false |
Key Is Equal To And Value Is Equal To |
widget_stock_level |
13 |
false |
Key Is Equal To And Value Is Equal To |
widget_stock_level |
12 |
true |
Webpage Link Has Any Query String |
best_sellars |
|
true |
Webpage Link Has No Query String |
|
|
true |
Commonly if the returned condition is true, we could display the item. And reverse the logic if the returned condition is false.
The above table proves that you can either test against keys or values. Alternatively you can setup a more stringent test, whereby you test for an exact key / value pair match, like the final example shows.
Please note: Equal-to, not equal-to, starts with and ends with test conditions can evaluate against all data types (strings, booleans and integers). Less-than, more-than and range test conditions can only be used with integers (number values).
%[endif]%
%%[[endif]]%%