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

Multilevel Menu #42

Open
pacollins opened this issue Jun 21, 2017 · 9 comments
Open

Multilevel Menu #42

pacollins opened this issue Jun 21, 2017 · 9 comments

Comments

@pacollins
Copy link
Collaborator

I noticed that identifiers is used to add an icon in the nav, so is there a way to have a drop down in the menu? I don't notice one so a request could be for this - something like parent and child.

@CFaught
Copy link

CFaught commented Oct 11, 2017

Has anyone worked on this? I'm curious about this myself and am still pretty new to Hugo or else I would have just done it myself. Anyone have any tips for getting this started?

@pacollins
Copy link
Collaborator Author

@CFaught I can work on it, or you can feel free. Checkout the Nav Partial, and see how it relates to the config file, then check out the css. If you know how to make a basic css dropdown, it shouldn't take long to make.

@CFaught
Copy link

CFaught commented Oct 12, 2017

Thanks, I'll take a look. Are children denoted as .Site.Menus.main.children in the config file?

@CFaught
Copy link

CFaught commented Oct 12, 2017

I got something working, the only issue I have at the moment is that every child after the first submenu item has a padding-left of 1em that I can't seem to override. Alas, CSS is not my strong point.

@CFaught
Copy link

CFaught commented Oct 12, 2017

My website's tutorial section is a live example of how it looks.

@pacollins
Copy link
Collaborator Author

@CFaught, it's actually a margin. margin-left: 0; on the element solves it, but lets see if we can figure out why its doing that. I will look later today.

@CFaught
Copy link

CFaught commented Oct 13, 2017

That's what it was, I was trying to set it as none. 0 works.

@henningsway
Copy link

@CFaught I think, the menus look great on your website. I found the related entries with the 'parent'-options in your config.toml. What else do I have to adjust to get multilevel-menus enabled for my site?

@CFaught
Copy link

CFaught commented Dec 31, 2017

@henningsway, if you clone this fork it should only require setting hasChildren = true and the identifier = <your naming convention> in the parent and parent = <identifier of parent> in the children. I set the weight as the same as well but I don't remember if that was necessary. I still need to get the sidebar submenu to collapse but at the moment it just lists them with an indent.

@pacollins pacollins removed this from the v0.40 milestone Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants