I am having trouble getting draft items to show in a “pages” panel field. The goal is to aggregate “video” pages from anywhere in the content tree and have them available within a “pages” input, whether or not they are draft.
Trying: query: site.index(true).template("video")
But this only yields non-draft entries, same as query: site.index.template("video")
I’ve also tried via a custom collection: query: kirby.collection("all_videos")
…alongside a custom collection with: return function ($site) { return $site->index(true)->template('video'); };
While this returns all videos, draft or otherwise, when using the collection in a template, the blueprint query still only returns non-draft items.
Thanks in advance for any help / ideas / experience anyone can provide!
There’s a lot of content on the site, so site.index(true) takes quite a while to load, but does NOT show the video drafts…yet site.index(true).drafts does(!).
Before I drag you further into this I’m going to try to set up a test environment with a totally clean install of Kirby and the simplest of content trees. This is a real head-scratcher.
Note that if you use query: site.index(true).drafts it does not return first level drafts, if you want the full index, you have to use site.index(true).