========= Utilities ========= Jinja comes with some utility tags shipped. Those arn't necessary but can help you with your templates. Capture Output ============== Captures output and stores it in a variable:: {% capture as loopdata %} {% for item in navigation %}
  • {{ item.caption|escapexml }}
  • {% endfor %} {% endcapture %} The output of the for loop is now stored in the variable ``loopdata``. This allows the double usage of block tags:: {% capture as title %}{% marker "title" %}{% endcapture %} {{ title|escapexml }} | My Webpage

    {{ title }}

    {% marker "body" %} Modify / Set Variables ====================== ``{% define %}`` allows you to set a variable. Usage:: {% define my_variable "Some Value" %} You can also apply filters:: {% define escaped content | escapexml %}