Get current Document within slice

Hi

I am trying to find the most efficient way to bring details about my current document page into my slice.

The slice seems to only be aware of itself and its direct associations by LinkField and so on, however I am interested in knowing about the document it is displayed on and I assume theres a way to get this data without doing any api requests.

I would like to get the document data, for example the property Title or data within other tabs of the document as this is already fetched, but without fetching it again.

Thank you. :slight_smile:

Using @nuxt/prismic and slicemachine fyi

Hi @michael7. The @next/prismic library uses the @prismicio/vue library for templating so you can refer to the Prismic docs for that library. In your particular case, check out the docs for the <SliceZone> component:

https://prismic.io/docs/technical-reference/prismicio-vue?version=v3#slicezone

It explains how you can pass arbitrary data to your slices via the context property.