qmsk_www_pages/templates/pages/page.html
author Tero Marttila <terom@paivola.fi>
Sun, 14 Sep 2014 04:42:01 +0300
changeset 216 e89e3f3a60db
parent 211 437c611c1caa
child 98 e7c3a81b4c4e
permissions -rw-r--r--
use <h1> page_title in template
{% extends "site.html" %}

{% block title %}{{ site_name }} :: {{ page_title }}{% endblock %}

{% block content %}
    <div class="container">
        <div id="header">
            <h1 class="page-header-title">
                <a href="{% url 'page' '' %}">{{ site_name }}</a>
            </h1>
        </div>
        <div id="breadcrumb">
            <ol class="breadcrumb">
                {% for page, title in page_breadcrumb %}
                <li><a href="{% url 'page' page %}">{{ title }}</a></li>
                {% endfor %}
            </ol>
        </div>
        <div class="row">
            <div class="col-sm-2" id="nav">
                {% for tree, tree_name in page_hierarchy %}
                {% if not forloop.first %}
                <hr />
                {% endif %}
                <ul class="nav">
                    {% for name, page, type, title in tree.list_sorted %}
                    <li class="page-tree-item{% if type %} page-tree-{{type}}{% else %} page-tree-tree{% endif %}{% if name == tree_name %} page-tree-active{% endif %}">
                        <a href="{% url 'page' page %}">
                            {% if not type %}
                            <i class="glyphicon glyphicon-chevron-right"></i>
                            {% endif %}
                            {{ title }}
                        </a>
                    </li>
                    {% endfor %}
                </ul>
                {% endfor %}
            </div>
            <div class="col-sm-8" id="content">
                <h1>{{ page_title }}</h1>

                {{ page_html|safe }}
            </div>
        </div>
        <div id="footer">
            <p class="page-footer-modified">
                Page modified <span title="{{ page_modified|date:'DATETIME_FORMAT' }}">{{ page_modified|date }}</span>
            </p>
        </div>
    </div>
{% endblock %}