Single line comment:
{# some comment #}
Multiple line comments:
{% comment %}
...
...
many comment text
{% endcomment %}
{% include template_name %}
template_name can be a variable or hard coded string.
Any text surrounded by a pair of braces ( {{ some-name }} ) is a variable.
Any text surrounded by curly braces and percent signs is a template tag.
{% if some-conditions %}
{% else %}
{% endif %}
some-contditions does not accept bracket for grouping, nor different boolean operators in some expression. Same boolean operator is fine.
Invalid expression: {% if bDone and bFoundOne or bFoundTwo %}
{% for oneItem in itemList %}
<li>{{ oneItem.field_one }}</li>
{% endfor %}
Variable that are available inside the for loop:
forloop.counter
forloop.counter0
forloop.revcounter
forloop.revcounter0
forloop.first -- boolean value set to True at the first element
forloop.last -- boolean value set to True at the last element
No continue or break inside the for loop.