rendered. The following makes the title variable all uppercase before rendering it: {{ title|upper } The slice filter extracts a slice of a sequence, a mapping, or a string. This returns the first four posts: {{ posts|slice(0,3) }}
title case, if there is a subtitle print the subtitle #} {% for post in posts|slice(0,1) %} <h1>{{ post.title|title }}</h1> {% if post.subtitle %} <small> {{ post.subtitle }} </small> {%endif%} {% endfor %}
contents of the parent block when overriding a block by using the parent function {{ parent() }} Great for prepending or appending to an existing block.
a boondoggle block #} {% block thing %} <p>This is a great big {{ thing }}.</p> {% endblock thing %} {% block boondoggle %} <p>Come get your {{ thing }}.</p> {% endblock boondoggle %}