[✨] Allow for multiple keyed menus with useContent #177
watzon
started this conversation in
Proposals For Qwik
Replies: 1 comment
-
|
We moved this issue to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem?
Currently it seems like it's only possible to define a single menu inside of
menu.md. This makes it frustrating to account for the possibility of multiple menus, such as a header menu and a footer menu (which will probably contain a basic sitemap).Describe the solution you'd like
There are a couple good ways I can think of handling this. Keep in mind that I have done zero digging into the code to see how things are structured, so take these with a grain of salt.
menu.mdusing top level headings. For example:menu.mdfiles the same way we allow for multiple layouts, and allowuseContentto accept an identifier as a parameter. SouseContent()would usemenu.md, whileuseContent('footer')would usemenu-footer.md.Describe alternatives you've considered
The obvious one is to just hard code the menu into the component, use a json file, or use an exported javascript object from another file. This is how I will probably handle the problem for now, but I wanted to bring this idea up for discussion anyway.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions