Condition |
Description |
Example |
if.equal |
This will ignore the shortcode, ie shortcode will not get executed. |
|
[if.equal lhs='{module.z}' rhs='{request.a1}'] we are equal [/if.equal] |
|
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.not_equal lhs='{module.z}' rhs='{request.a1}'] we are equal [/if.equal] |
|
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.empty module.a2] a2 is empty [/if.empty] |
|
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.not_empty request.a2] a2 is not empty [/if.not_empty] |
|
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. |
|
[template.set x='hello world' /] [if.str template.x] Variable is a String [/if.str] |
|
if.not_str |
Used to determine whether the given variable is not string. |
|
[template.set x='1' /] [if.not_str template.x] Variable is not a String [/if.not_str] |
|
if.date_obj |
Used to determine whether the given variable is a date object. |
|
[template.set var_num="100" /] [if.date_obj template.var_num] var_num is date_obj [/if.date_obj] |
|
if.not_date_obj |
Used to determine whether the given variable is not a date object. |
|
[template.set var_num="100" /] [if.not_date_obj template.var_num] [template.set str="var_num is date_obj" /] [/if.not_date_obj] |
|
if.num |
Used to determine whether the given variable is a number. |
|
[template.set var_num="200"/] [if.num template.var_num] var_num is number [/if.num] |
|
if.not_num |
Used to determine whether the given variable is not number. |
|
[template.set var_num="200"/] [if.not_num template.var_num] var_num is not number [/if.not_num] |
|
if.obj |
Used to determine whether the given variable is an object. |
|
[template.set varx="100" /] [if.obj template.varx] [template.set str="varx is object" /] [/if.obj] [if.else] [template.set str="varx is not object" /] [/if.else] |
|
if.not_obj |
Used to determine whether the given variable is not an object. |
|
[template.set varx="hello world" /] [if.not_obj template.varx] [template.set str="varx is not object" /] [/if.not_obj] |
|
if.bool |
Used to determine whether the given variable type is a boolean. |
|
[template.set x='1' /] [if.bool template.x] Variable is of Boolean Type [/if.bool] |
|
if.not_bool |
Used to determine whether the given variable type is not boolean. |
|
[template.set x='1' /] [if.not_bool template.x] Variable is not of Boolean Type [/if.not_bool] |
|
if.and & if.or |
They can be paired with any if shortcode condition, they act as && and || conditions to if shortcodes. |
Example for And
|
[module.set y='hel dldl' z=hi /] [module.set_array ar a=1 b=2 /] [if.equal lhs='{module.z}' rhs='{request.a1}'] [/if.equal] [if.and lhs='{module.y}' equal='{request.a2}'] we are also equal [/if.and] [if.else] we are not equal [/if.else] |
Example for OR
|
[module.set y='hel dldl' z=hi /] [module.set_array ar a=1 b=2 /] [if.equal lhs='{module.z}' rhs='{request.a1}'] we are equal [/if.equal] [if.or lhs='{module.y}' equal='{request.a2}'] we are also equal [/if.or] [if.else] we are not equal [/if.else] |
|
if.else |
Code to be executed when if condition is false. It can be paired with any “if” shortcode. |
|
[module.set y='hel dldl' z=hi /] [module.set_array ar a=1 b=2 /] [if.equal lhs='{module.z}' rhs='{request.a1}'] we are equal [/if.equal] [if.else] we are not equal [/if.else] |
|