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

Root menu with submenus wrong selected value

Open Reve opened this issue 6 years ago • 0 comments

The selected value of a root menu is overriden by _process_breadcrums. For example, if the _is_selected function correctly determines that a root menu is selected by accessing a link which contains the root's url, when _process_breadcrums is run, the selected value goes back to False.

As a workaround for this issue you can use: {% if item.selected or item.url in request.path %} active {% endif %}

Reve avatar Jan 30 '20 19:01 Reve