Menus and Navigation
These examples are taken from base.html.
Breadcrumbs
{% for path in page.get_path %}
{% if not forloop.first %} > {% endif %}
{% if not forloop.last %}<a href="{% cms_link path %}">
{% else %}<span class="active">
{% endif %}
{{ path|cms_get_content_title:language|escape }}
{% if not forloop.last %}</a>
{% else %}</span>
{% endif %}
{% endfor %}
There is also a new breadcrumbs templatetag. Just insert
{% cms_breadcrumbs %}
into your template.
A simple navigation menu
{% cms_navigation_level 1 as nav %}
<ul id="main_menu">
{% for mainpage in nav %}
<li><a class="{% if_cms_is_subpage page mainpage %}menu_active{% end_if_cms_is_subpage %}" href="{% cms_link mainpage %}">
{{ mainpage.title|escape }}</a></li>
{% endfor %}
</ul>
{% cms_navigation_level <n> as nav %} gets the pages at that level in the hierarchy, in the current path.
Table of Contents
When enabled, this option will generate a per-page unordered list based on the anchor elements in the content. Template code:
{% if page.toc %}
<h2>Table of contents</h2>
{{ page_content.toc }}
{% endif %}
