django - How to Create a Mezzanine menu including children elements of current page -
i want create menu handles information current page , siblings example, if have following tree:

if in page child 1 menu should display page 1 , children 1-3
this can achieved following code:
<a href="{{ page.parent.get_absolute_url }}">{{ page.parent.title }}</a> <ul> {% page_menu page.parent %} </ul> the problem have display grand child 1 , 2 if located in child 2. how can that?
i tried following:
<ul> {% page in branch_page %} {% if page.is_current_sibling %} <li><a href="{{ page.get_absolute_url }}"> {{ page.title }}</a> {% if page.is_current_or_ascendant %} {% page_menu page %} {% endif %} {% endif %} {% endfor %} </ul> but doesn't work , not display error, how can in way?
the page_menu template tag lets pass in optional parent page, , menu template used recursively rendering children, eg "page" current page: {% load pages_tags %} {% page_menu page "pages/menus/tree.html" %}
ref: https://groups.google.com/forum/#!msg/mezzanine-users/fk2nm6k6qho/vyepf5d6cxgj
Comments
Post a Comment