1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-12-21 05:11:17 +00:00
nginx-sso/vendor/github.com/flosch/pongo2/template_tests/whitespace_control.tpl

34 lines
562 B
Smarty
Raw Normal View History

Standard whitespace control:
{% if true %}
Standard whitespace control
{% endif %}
Full Trim whitespace control:
{% if true -%}
Full Trim whitespace control
{%- endif %}
Useful with logic:
{%- if false %}
1st choice
{%- elif false %}
2nd choice
{%- elif true %}
3rd choice
{%- endif %}
Cycle without whitespace control:
{% for i in simple.multiple_item_list %}
{{ i }}
{% endfor %}
Cycle with whitespace control:
{% for i in simple.multiple_item_list %}
{{- i }}
{% endfor %}
Trim everything:
{% for i in simple.multiple_item_list -%}
{{ i }}
{%- endfor %}