You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 %}
The text was updated successfully, but these errors were encountered:
stfl
added a commit
to stfl/django-menu-generator
that referenced
this issue
Oct 4, 2021
A
-> A.1
-> A.2
Selecting a menu item with a submenu (A) will always call _process_breadcrums() on all submenu items (A.1, A.2)
If non of the submenu items is selected, the parent node is also not selected.
Selecting A.1 will work and select A.
Directly selecting A will not mark A as selcted, as neither A.1 nor A.2 are selected.
fixesLaLogiaDePython#16
stfl
linked a pull request
Oct 4, 2021
that will
close
this issue
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 %}
The text was updated successfully, but these errors were encountered: