django-simple-menu icon indicating copy to clipboard operation
django-simple-menu copied to clipboard

Match URL with query string

Open jjoseba opened this issue 4 years ago • 0 comments

Currently, if a MenuItem receives a URL with query params, since the url match is done against the request.path, there is no way for that item to be checked as active.

For example, if I configure this item:

Menu.add_item("main", MenuItem(_("Item"), reverse('app:my_view')+'?status=active', weight=10))

That item will not be marked as the active item. Maybe MenuItem() could receive an additional argument to be able to take into account the current queryparam for the match_url() method.

jjoseba avatar Jun 10 '20 12:06 jjoseba