Closed tristantbg closed 4 years ago
Hello, sorry for the long wait.
You could probably hack this into the plugin by changing this line: https://github.com/rasteiner/k3-pagesdisplay-section/blob/master/src/PagesDisplaySection.php#L29
from
if(is_a($pages, 'Kirby\\Cms\\Pages')) {
to
if(is_a($pages, 'Kirby\\Cms\\Collection')) {
I'm not 100% sure I want to do this for everyone, since collections could really contain anything. But I guess that could also be the users responsibility to give the plugin only collections of actually pages
Discard what I've said above. Collections don't work that way and the problem was elsewhere.
I'll add the feature and let you know.
collections via kirby.collection('name')
should now work in version 0.0.6
Great! Thanks.
When I try to do this :
kirby.collection("projects")
I get this error :
The section "projects" could not be loaded: Invalid query result - Result must be of type Kirby\Cms\Pages, NULL given.
I used
site.index
instead but it is quite bad for performance: https://getkirby.com/docs/reference/objects/site/index#detailsThank you.