queryContent and ContentNavigation not working the way I envisioned - pulling up higher directory links #2709
Unanswered
nancysavescu
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, Everyone,
I am seeking some assistance. I am trying to wrap my head around something which I thought would be simple, but it's not working out the way I imagined. I reviewed this documentation: https://content.nuxt.com/components/content-navigation
I am looking to implement compartmentalized guides or tutorials. As a rough example, my content dir would resemble something like the following:
So hopefully you get the drift... One guide has no relation to the other guide. My pages/slugs all work as they should. But my problem is with "how" the navigation links are being pulled up.
I am using separate components for the navigation for each set of guides. So for example, I have FirstguideNav with the following:
My expectation is to get the following links for "First Guide" appearing as follows:
But what I get instead:
When reviewing this piece: queryContent('guides/first-guide'), I am expecting for what's only inside "first-guide" to be grabbed. Is there a way to get rid of the higher level directories that are showing?
Beta Was this translation helpful? Give feedback.
All reactions