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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -