Using var_dump or print_r on Kirby collections?

If you are only interested in what images are contained in the collection, you can use the following:

<?php print_r($page->images()->keys()); ?>

This also works for page collections:

<?php print_r($page->children()->keys()); ?>
2 Likes