Published on : August 07, 2020
Title : if.else
Purpose : To execute logic if first condition get false.
Syntax : [if.empty template.variable_name]
//** Do something if variable not contain any value **//
[/if.empty]
[if.else]
//** Do something if variable contain any value **//
[/if.else]
Input Parameters : It does not have any parameter
Return Value : It does not return anything
Example 1 :
Code : [template.count = “12”/]
[if.empty template.count]
    Count variable is empty.
[/if.empty]
[if.else]
    Count variable is not empty.
[/if.else]
Output : Count variable is not empty.
Description : In the example, count variable is declered and there is store value 12. As the variable is not empty, the condition will get not satisfied and the logic inside the else will get executed.