Active menus based on parent child hierarchy

Created on 22 April 2024, 2 months ago
Updated 12 May 2024, about 1 month ago

Problem/Motivation

The module is working fine for the menu if the child URL and its path are inside the parent URL and its path.
for example
menu item: about with path '/about' and no parent
menu item: link1 with path '/about/link1' and about as a parent
if we visit '/about/link1' this will make about and link1 an active trail, however, if we have for example
menu item: link2 with path '/about/link1/link2' and about as parent
if we visit '/about/link1/link2' this also will make about and link1 and link2 as active trail even though link2 is not a child of link1, hence link1 shouldn't be active

Steps to reproduce

Proposed resolution

Change the way this module works to check the menu item and not the path.
Please note that it will not search the full menu item list, it will return and stop searching when finding the needed menu item, as there is no case of two menu items with the same destination.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

1.3

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024