earle/django-bootstrap — pull request #37 by mitenka (2012-02-27 16:21:01+00:00)
Title: Menuitem template tag

Hello there! Great work!

Are you planing to extand django-bootstrap with some additional features (not only about forms, I mean)? If yes, let me propose menuitem template tag. It has pretty the same syntax as django's url tag. So, it renders html's
element for navigation. If current url starts with tag's url pointed to, it sets class "active" for the
element. And you can set strict match with url by passing "_bullseye" argument.

Sure, it works for the tabs, pills, nav lists and navbar.

Examples:
{% menuitem workflow %}Workflow{% endmenuitem %}

{% menuitem detail slug=hotel.slug _bullseye %}Info{% endmenuitem %}
{% menuitem rates slug=hotel.slug _bullseye %}Rates{% endmenuitem %}

Thank you.