Expose slug, uuid of page to StoryblokStory #112
-
DescriptionI am using the Storyblok SDK with Nextjs using the app router. When setting up my app for use and using StoryblokStory in my [...slug]/page.tsx I pass it the whole storyblok story object but what is exposed to my underlying page type is the story.content object. This does not have access to the uuid of the story or the slug of the page which is necessary for me to fetch secondary data. Suggested solution or improvementExpose the whole story object to the StoryblokStory Additional contextmy [...slug]/page.tsx looks like and one of my underlying page types looks like Validations
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can pass arbitrary props to
|
Beta Was this translation helpful? Give feedback.
You can pass arbitrary props to
StoryblokStoryand they'll be available in your component.return <StoryblokStory story={data.story} slug={data.slug} storyUUID={data.uuid} />