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
Post a Comment