mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2024-12-21 05:11:17 +00:00
34 lines
562 B
Smarty
34 lines
562 B
Smarty
|
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 %}
|