I have an array of page IDs like
$pages = [
'blog/post-one',
'blog/post-two',
'blog/post-three',
]
With
$collection = new Pages($pages ?? []);
I receive a Pages Collection $collection
containing those three pages. This works fine with pages of status listed
or unlisted
, but not with drafts; if the IDs in $pages
are for pages of draft
status, I receive this error:
Kirby\Exception\InvalidArgumentException thrown with message “You must pass a Page object to the Pages collection”
Is there a way to create a pages collection from a set of IDs, while those are drafts?