ilie
(Ilie Ghiciuc)
July 7, 2020, 4:58pm
1
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
Hey @ilie , Thanks for flagging this. Max was right, that the uid would fix the problem, but that’s actually an error. If you have queryType="single"
and type
defined, you shouldn’t need a uid
. I’ve submitted a request to fix this, and I’ll let you know how it goes.
Update: this is now fixed. You can query a singleton like so:
<slice-zone type="your-single-type" queryType="single" />
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
September 25, 2020, 3:47pm
7
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
Phil
(Phil Snow)
November 9, 2020, 9:22am
9
@samlittlefair Does this need to be updated in the documentatio n to say that the users need a certain version?