westerveltco / django-simple-nav

A simple, flexible, and extensible navigation menu for Django
https://django-simple-nav.westervelt.dev
MIT License
11 stars 0 forks source link

Active item not matching for named urls #68

Closed joshuadavidthomas closed 5 months ago

joshuadavidthomas commented 5 months ago

If you specify a NavGroup or NavItem with a url that is a named Django url, the active property is not applied correctly.

from django_simple_nav.nav import Nav
from django_simple_nav.nav import NavItem

class ClubsTabs(Nav):
    template_name = "navigation/tabs.html"
    items = [
        NavItem(title="Overview", url="clubs_dashboard"),
    ]

image

("Overview" should be underlined.)