Query for full page data using the SliceZone

Hi, I am attempting to render a list of blog posts on our homepage. I am using SlizeZone to retrieve the list of articles. The data returned Is very minimal in the "articles_to_list" and I am unsure how to retrieve the full data so I can display the image, title, short description etc... I have a workaround using .getByUid but I'm hoping there is a cleaner way.

Thank you!

Tom

Hi Tom,

Can you tell me are you using Next.js or Nuxt.js?

Thanks.

We are using next.js

For querying a list od documents and getting all their data then you're better using the @prismic/client and querying by type:

Like we do in our Next.js blog example:

Otherwise you'll want to use Fetchlinks or GraphQuery (Fetchlinks V2), but for this make sure you're using the latest version of the next-slicezone package (0.1.0-alpha.0), which changes how values from the parameters are called. Learn more about next-slicezone's Lifecycle hooks.

To install this run npm install next-slicezone@0.1.0-alpha.0

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.