layout |
---|
home |
The silverfin templating languages uses 3 kinds of tags:
Each has its own purpose as explained below.
Print tags {% raw %}{{ }}{% endraw %}
are used to print variables on the screen.
{% capture input %} {% raw %}
// {% assign variable = 100 %}
{{ variable }}
{% endraw %}
{% endcapture %}
{% capture output %}
100
{% endcapture %}
{% include preview.html %}
Logic tags {% raw %}{% %}{% endraw %}
are used for logic and control flows.
{% capture input %}
{% raw %} {% assign variable = 100 %} {% if variable > 0 %} Hello world {% else %} Bye World {% endif %} {% endraw %}
{% endcapture %} {% capture output %} Hello world {% endcapture %} {% include preview.html %}