Footer menu

This commit is contained in:
Oleg Lavrovsky 2017-03-08 22:41:29 +01:00
parent 0f27d97d64
commit 4e88b3f71f
4 changed files with 23 additions and 11 deletions

View file

@ -0,0 +1,7 @@
{% load navigation wagtailcore_tags %}
<ul class="list-unstyled">
{% for menuitem in menuitems %}
<li><a href="{% pageurl menuitem %}">{{ menuitem.title }}</a></li>
{% endfor %}
</ul>

View file

@ -1,5 +1,4 @@
{% load navigation wagtailcore_tags %} {% load navigation wagtailcore_tags %}
{% get_site_root as site_root %}
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">

View file

@ -39,10 +39,19 @@ def top_menu(context, parent, calling_page=None):
# Retrieves the children of the top menu items for the drop downs # Retrieves the children of the top menu items for the drop downs
@register.inclusion_tag('tags/top_menu_children.html', takes_context=True) @register.inclusion_tag('tags/top_menu_children.html', takes_context=True)
def top_menu_children(context, parent): def top_menu_children(context, parent):
menuitems_children = parent.get_children() menuitems_children = parent.get_children().live().in_menu()
menuitems_children = menuitems_children.live().in_menu()
return { return {
'parent': parent, 'parent': parent,
'menuitems_children': menuitems_children, 'menuitems_children': menuitems_children,
'request': context['request'], 'request': context['request'],
} }
# Retrieves the footer menu items
@register.inclusion_tag('tags/footer_menu.html', takes_context=True)
def footer_menu(context, parent, calling_page=None):
menuitems = parent.get_children().live().in_menu()
return {
'calling_page': calling_page,
'menuitems': menuitems,
'request': context['request'],
}

View file

@ -1,17 +1,14 @@
{% load wagtailcore_tags navigation %}
{% get_site_root as site_root %}
<!-- Footer --> <!-- Footer -->
<footer id="footer"> <footer id="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<ul class="list-unstyled"> <!-- Bottom Menu -->
<li><a href="#">Über uns</a></li> {% footer_menu parent=site_root calling_page=self %}
<li><a href="#">Mitglied werden</a></li>
<li><a href="#">Veranstaltungen</a></li>
<li><a href="#">Projekte und Aktivitäten</a></li>
<li><a href="#">Information zu Public Health</a></li>
<li><a href="#">Agenda</a></li>
</ul>
</div> </div>
<div class="col-md-4" id="contact"> <div class="col-md-4" id="contact">
<address> <address>