Skip to content

Conversation

@LukeTowers
Copy link
Member

Fixes #6 by passing the desired sub menu item to the page as a hash parameter when the page is first loaded; then detects the presence of the hash parameter and uses it to load the selected child page in JS when the page itself first loads; at which point the on-page navigation handling can take over. There is a small flash of the wrong menu item being selected when the page first loads, but it was an acceptable trade-off for me for now.

@LukeTowers LukeTowers requested a review from mjauvin June 25, 2025 19:27
Copy link
Member

@mjauvin mjauvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally! :)

@mjauvin
Copy link
Member

mjauvin commented Jun 26, 2025

@LukeTowers When using Top menu instead, I get flaky behavior when switching to different CMS sub-menu items. Do you get this?

@mjauvin
Copy link
Member

mjauvin commented Jun 26, 2025

In fact, with Top menu location, CMS sub-menu just don't work.

@LukeTowers
Copy link
Member Author

To be fair I didn't test that at all 😂 I'll take another look at it later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sub-menu items under CMS menu not opening directly.

3 participants