Example 1: Using Boolean Values in Arguments

The example below shows how to execute or cancel executing code available in the snippet depending on the provided argument.

Code in the snippet:

<!--{if arguments[0] }-->
...
<!--{/if}-->

Code in the template:

<!--{ call sample_snippet(true) }-->

In this case code available in the snippet will be executed in the template, because the argument in the template is set to true .

Code in the template:

<!--{ call sample_snippet(false) }-->

In this case code available in the snippet will not be executed in the template, because the argument in the template is set to false .