adding menu context processor and hooking up template

This commit is contained in:
Luke Hatcher 2012-02-05 22:01:56 -05:00
parent 53fecaafc1
commit 4ca2118bca
2 changed files with 25 additions and 0 deletions

View file

@ -131,6 +131,8 @@ TEMPLATE_CONTEXT_PROCESSORS = [
"pinax.core.context_processors.pinax_settings",
"pinax.apps.account.context_processors.account",
"cms.context_processors.menuitems",
]
INSTALLED_APPS = [

View file

@ -2,11 +2,34 @@
{% load metron_tags %}
{% load i18n %}
{% load mptt_tags %}
{% block extra_head_base %}
{% block extra_head %}{% endblock %}
{% endblock %}
{% block nav %}
<ul class="nav">
{% recursetree menuitems %}
{% if not node.is_leaf_node %}
<li id="tab_{{ node.slug }}" class="dropdown">
<a href="#"
class="dropdown-toggle"
data-toggle="dropdown">
{{ node.name }}
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
{{ children }}
</ul>
</li>
{% else %}
<li id="tab_{{ node.slug }}"><a href="{{ node.url }}">{{ node.name }}</a></li>
{% endif %}
{% endrecursetree %}
</ul>
{% endblock %}
{% block footer %}
<div class="legal">
{% include "_footer.html" %}