if.not_empty

/ Conditionals / if.not_empty

 

Title : if.not_empty
Purpose : If the provided variable is not_empty then executes
Syntax : [if.not_empty  “variable” ]

[/if.not_empty]

Example 1 :
Code : [if.not_empty template.data.title]

<p class=”brand-secondary font-bold”>[template.data.title /]</p>

[/if.not_empty]

Output :  If the title provides then its display otherwise it does not display the whole p tag (It does not occur space in page)
Description : In the example, if the title provides then it executes and displays the title, then the first not.empty condition will get satisfied the title is display.
Categories
Most Popular

Leave a Reply

Your email address will not be published.