How to fetch data from tabs?

Hi,
I created a customType with data into a custom tab.
When I query the page with this method:
const prismicDocument = (await $prismic.api.getSingle('le-test-page', { lang : localeForPrismic })).data;
data of the custom tab are not retrieved.
Can you help me to retrieve the tabs data of a sigle page using Nuxt ?
Thank you.
Eric;

Tabs don't change the API structure - they are purely for organisation on the front end for the writing team.

You'd need to retrieve the whole document then select the fields that you need from a specific tab

1 Like

Hey, @ricou and @kris, thanks for reaching out.

The only difference that you'll see in the structure of the API response is that the Slices appear in a different body. A new body appended with a number node will be created for each new tab you add. So, tab one will be body1, the second one body2, etc.

Thank you.
Indeed, the data of the tabs are well recovered

1 Like