Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub navigation? #261

Open
matthewcoxx opened this issue Mar 1, 2020 · 1 comment
Open

Sub navigation? #261

matthewcoxx opened this issue Mar 1, 2020 · 1 comment

Comments

@matthewcoxx
Copy link

Is sub navigation even possible in NextJS and this or am I missing something? I cannot figure out how to have a menu like this:

Home
--> Subpage
--> Subpage
-->-->SubSubpage
Main Page
Contact Page

I want to be able to track which option is pressed for example if subpage is selected then Home would be highlighted because it is the parent. Is this possible? If so how?

@jonshipman
Copy link

You would need to separate the menu out into its own component like so:

code

I added parents, hasChildren, and children (list_of Integer) to the theme headermenutype (renamed nestedmenu in my code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants