- Issue created by @mwjansen
Thanks for raising this one. It's been on our mind for a while. I'll move this into the backlog for discovery.
I think the menu has the following shortcomings for level-0 items:
For the desktop menu:
Create a primary menu, set a link on a 'top level' element. Set the primary menu to style 'drawer'.
Click on a top menu item: it shows its sub-menu but does not open the associated page.
For the mobile menu:
Create a menu item with 'nolink' (in brackets) set. Create 'next level' menu items under the 'nolink' menu item.
Open the menu on a mobile phone.
Select the title of the 'nolink' item: it doesn't open to show the next level of that menu item (this is what I would intuitively expect)
For the desktop:
Separate the menu link from its collapsible icon in the twig.
Make both the anchor and the icon (or their parent elements) trigger the panel.
On 'panel open' in javascript, check which element triggered the 'panel open': if it was the anchor, load its associated page.
When somebody clicks the collapsible icon it will just show the sub-menu.
When in place, when somebody clicks the anchor it will (briefly) show the sub-menu before loading the new page.
That should (hopefully) be enough of a visual clue that the item has a sub-menu as well as a link.
For the mobile issue:
In preprocessing: find any 'nolink' URL and clear the item URL
In twig, if a menu item has no link but it has children: cause it to open the next level panel
Active
1.8
Code
Thanks for raising this one. It's been on our mind for a while. I'll move this into the backlog for discovery.