{% extends "base.html" %}

{% block content %}
<div class="row">
    <div class="col-md-8">
      <h1>{{ page.title }}</h1>
      {{ page.content }}
      {% for p in pages|sort(attribute='sort-order') %}
        {% if next_up %}
            <br/>
            Next read the 
            <a href="/{{ p.slug }}.html">{{ p.title|lower }}</a> section.
            {% set next_up = False %}    
        {% endif %}
        {% if p.slug == page.slug %}
            {% set next_up = True %}
        {% endif %}
      {% endfor %}
    </div>
    {% include "sidebar.html" %}
</div>
{% endblock %}
