python - Subnavigation in Django -


i need subnavigation on pages. inherit base.html main navigation located, don't know how make subnavigation differs page page.

i've thought making template tag in can specify items subnavigation in each template file, , output subnavigation if subnavigation items specified. how others it?

why can't have separate block subnavigation , override block in child templates?

base.html

<a href="">calls</a> <a href="">messages</a> {% block subnav %} {% endblock %} 

calls.html

{% extends "base.html" %} {% block subnav %}     <a href="">outbound calls</a>     <a href="">inbound calls</a> {% endblock %} 

messages.html

{% extends "base.html" %} {% block subnav %}     <a href="">sent messages</a>     <a href="">recieved messages</a> {% endblock %} 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -