Cannot load slices on homepage

Hello everyone,

Is this the right way to query for slices on the homepage?

<slice-zone type="homepage" queryType="single" />

It seems like no matter how I write this query I get “Your SliceZone is empty”. It works on the other pages when I use it like this:

<slice-zone type="page" :uid="$route.params.uid" :lang="$route.params.lang" />

Anything I should do differently?

I think you need to set the UID too. It will be whatever the UID is on your homepage document:

<slice-zone type="page" uid="homepage" :lang="$route.params.lang" />

Otherwise the uid will be undefined which I think is causing this error.

1 Like