{% extends "layout.html" %} {% set title = _('Index') + ' - ' + key %} {% block body %}

Index – {{ key }}

{% for k, e in genindexentries %} {% if k == key %} {{ k }} {% else %} {{ k }} {% endif %} {% if not loop.last %} | {% endif %} {% endfor %}
Full index on one page
{% set halfcount = ((count // 2) + (count % 2))|int %}
    {% set item_count = [0] %} {% for letter, entrylist in entries %} {% for entry, (_, subentries, _) in entrylist %} {% if item_count[0] < halfcount %}
  • {% if entry[1] %} {{ entry[0]|e }} {% else %} {{ entry[0]|e }} {% endif %} {% if subentries %}
      {% for subentry, (_, uri, _) in subentries %}
    • {% if uri %} {{ subentry|e }} {% else %} {{ subentry|e }} {% endif %}
    • {% endfor %}
    {% endif %}
  • {% if item_count.append(item_count.pop() + 1 + (subentries|length if subentries else 0)) %}{% endif %} {% endif %} {% endfor %} {% endfor %}
    {% set item_count = [0] %} {% for letter, entrylist in entries %} {% for entry, (_, subentries, _) in entrylist %} {% set total_subitems = 1 + (subentries|length if subentries else 0) %} {% if item_count[0] >= halfcount %}
  • {% if entry[1] %} {{ entry[0]|e }} {% else %} {{ entry[0]|e }} {% endif %} {% if subentries %}
      {% for subentry, (_, uri, _) in subentries %}
    • {% if uri %} {{ subentry|e }} {% else %} {{ subentry|e }} {% endif %}
    • {% endfor %}
    {% endif %}
  • {% endif %} {% if item_count.append(item_count.pop() + total_subitems) %}{% endif %} {% endfor %} {% endfor %}
{% endblock %}