In Kirby 3 when I use
<?php dump($page->find('gallery')->images()->keys()) ?>
I get:
Array
(
[0] => about/gallery/image1.jpg
[1] => about/gallery/image2.jpg
[2] => about/gallery/image3.jpg
[3] => about/gallery/image4.jpg
)
i.e. the full path of the images.
Whereas in the documentation the example goes as follows
<?php dump($page->files()->keys()) ?>
/*
[
'document.pdf',
'numbers.xls',
'myimage.jpg',
'download.zip'
]
*/
i.e. the keys are without the path.
Maybe this is a previous behaviour? It also seems to be used that way in the gallery plugin that I was trying to adapt from Kirby2.
BTW it does not make a difference if the images are in the subfolder or directly in the page folder.
Any hints welcome.
PS: If the full path behaviour is the correct one, how could I obtain just the filename instead?