test/syntax/source/code/django
raw| 1 | {% if articles|length %} |
| 2 | {% for article in articles %} |
| 3 | |
| 4 | {# Striped table #} |
| 5 | <tr class="{% cycle odd,even %}"> |
| 6 | <td>{{ article|default:"Hi... "|escape }}</td> |
| 7 | <td {% if article.today %}class="today"{% endif %}>{{ article.date|date:'d.m.Y' }}</td> |
| 8 | </tr> |
| 9 | |
| 10 | {% endfor %} |
| 11 | {% endif %} |
| 12 | |
| 13 | {% comment %} |
| 14 | Comments may be long and multiline. |
| 15 | Markup is <em>not</em> highlighted within comments. |
| 16 | {% endcomment %} |