Quick List of conditionals
[if.equal lhs=<string> rhs=<string>][/if.equal]x
[if.not_equal lhs=<string> rhs=<string>][/if.not_equal]
[if.greater_equal lhs=<string> rhs=<string>][/if.greater_equal]
[if.greater_than lhs=<string> rhs=<string>][/if.greater_than]
[if.less_equal lhs=<string> rhs=<string>][/if.less_equal]
[if.less_than lhs=<string> rhs=<string>][/if.less_than]
[if.whitespace <chain>][/if.whitespace]
[if.not_whitespace <chain>][/if.not_whitespace]
[if.false <chain>][/if.false]
[if.true <chain>][/if.true]
[if.no <chain>][/if.no]
[if.yes <chain>][/if.yes]
[if.not_empty <chain>][/if.not_empty]
[if.odd <chain>][/if.odd]
[if.even <chain>][/if.even]
[if.user_can <string>][/if.user_can]
[if.user_cannot <string>][/if.user_cannot]
[if.logged_in][/if.logged_in]
[if.not_logged_in][/if.not_logged_in]
[if.request <string>][/if.request]
[if.not_request <string>][/if.not_request]
[if.device <string>][/if.device]
datatypes:
[if.arr <chain>][/if.arr]
[if.not_arr <chain>][/if.not_arr]
[if.int <chain>][/if.int]
[if.not_int <chain>][/if.not_int]
[if.str <chain>][/if.str]
[if.not_str <chain>][/if.not_str]
[if.date_obj <chain>][/if.date_obj]
[if.not_date_obj <chain>][/if.not_date_obj]
[if.contains needle=<string> haystack=<comma separated string/array>][/if.contains]
[if.not_contains needle=<string> haystack=<comma separated string/array>][/if.not_contains]
———————————————————————–
Condition | Description | Example | ||||
---|---|---|---|---|---|---|
if.equal | This will ignore the shortcode, ie shortcode will not get executed. |
|
||||
if.not_equal | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. |
|
||||
if.greater_equal | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.greater_than | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.less_equal | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.less_than | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.whitespace | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.not_whitespace | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.true | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.false | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.no | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.yes | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.empty | This will ignore the shortcode, ie shortcode will not get executed. |
|
||||
if.not_empty | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. |
|
||||
if.odd | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.even | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.user_can | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.user_cannot | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.logged_in | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.not_logged_in | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.request | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.not_request | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.device | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.contains | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.not_contains | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.arr | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.not_arr | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.int | empty condition checks for string if=” or null or does not exist. For array, it will be true if it is empty or does not exist. | |||||
if.not_int | This will ignore the shortcode, ie shortcode will not get executed. | [aw2.get app.path ignore=true /] | ||||
if.str | Used to determine whether the given variable is a string. |
|
||||
if.not_str | Used to determine whether the given variable is not string. |
|
||||
if.date_obj | Used to determine whether the given variable is a date object. |
|
||||
if.not_date_obj | Used to determine whether the given variable is not a date object. |
|
||||
if.num | Used to determine whether the given variable is a number. |
|
||||
if.not_num | Used to determine whether the given variable is not number. |
|
||||
if.obj | Used to determine whether the given variable is an object. |
|
||||
if.not_obj | Used to determine whether the given variable is not an object. |
|
||||
if.bool | Used to determine whether the given variable type is a boolean. |
|
||||
if.not_bool | Used to determine whether the given variable type is not boolean. |
|
||||
if.and & if.or | They can be paired with any if shortcode condition, they act as && and || conditions to if shortcodes. | Example for And
Example for OR
|
||||
if.else | Code to be executed when if condition is false. It can be paired with any “if” shortcode. |
|