Top navbar tabs AND expandable sidebar nav sections? #6455
-
I was going nuts earlier trying to figure out how to make my sidebar navigation sections expandable. I had seen it before, so I commented out all my Is there a way to have both? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello, As far as I know there is no config option to achieve what you ask for. |
Beta Was this translation helpful? Give feedback.
-
I am also not aware of a way to achieve what you are asking for, other than customizing the partials. The point of The FastAPI site is a good example how how it is meant to work. Before you consider changing partials, ask yourself if the approach you choose will really make sense in the long-run. |
Beta Was this translation helpful? Give feedback.
-
@kamilkrzyskow & @alexjlockwood Thank you both for your replies. What you've said makes sense. I'm realizing I misunderstood how |
Beta Was this translation helpful? Give feedback.
Hello,
once you enable
navigation.tabs
level 1 navigation sections become tabs on the website. Then all other navigation sections are rendered on the sidebar. That's the purpose of tabs, to change the context of the displayed content. Therefore, if you enable tabs and Hardware is it's own section there isn't much sense in adding other sections like Networking / Software to the sidebar visible on Hardware.As far as I know there is no config option to achieve what you ask for.
Only thing you could do, would be to use theme overrides and override the
nav.html
ornav-item.html
partial.https://squidfunk.github.io/mkdocs-material/customization/#extending-the-theme