# How might I show images from a page subfolder in the panel?

**URL:** <https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 6, 2021, 2:43am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095 "2021-02-06T02:43:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![1-L-P](https://avatars.discourse-cdn.com/v4/letter/1/9fc348/32.png) [@1-L-P](https://forum.getkirby.com/u/1-L-P)\
**Post date:** [February 6, 2021, 2:43am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/1 "2021-02-06T02:43:08Z")

</div>

Hello all, would anyone know I might show images from a page subfolder in the panel?

In my YML file:

```
sections:
 gallery:
    type: posters/files
    layout: cards
    image:
      cover: true
      ratio: 4/3   

```

brings up images in that are in the parent page folder, I have a subfolder within this which I would also like to show in the panel? Thanks all.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 6, 2021, 8:41am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/2 "2021-02-06T08:41:32Z")

</div>

A files section can only have one parent page, you cannot query images from multiple pages.

If you only need display functionality without the upload option, you can use my plugin that allows querying files:

> **[texnixe/k3-filesdisplay-section](https://github.com/texnixe/k3-filesdisplay-section)**
>
> Contribute to texnixe/k3-filesdisplay-section development by creating an account on GitHub.

As an alternative, you can use multiple sections with different parent pages.

---

<div class="post-metadata">

**Author:** ![hww](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/hww/32/9526_2.png) [@hww](https://forum.getkirby.com/u/hww)\
**Post date:** [February 6, 2021, 9:21am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/3 "2021-02-06T09:21:45Z")

</div>

This is exactly what I need right now. Thanks alot, @texnixe !

---

<div class="post-metadata">

**Author:** ![1-L-P](https://avatars.discourse-cdn.com/v4/letter/1/9fc348/32.png) [@1-L-P](https://forum.getkirby.com/u/1-L-P)\
**Post date:** [February 6, 2021, 10:35am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/4 "2021-02-06T10:35:40Z")

</div>

@texnixe I thought this might be the case, however, your plugin might be a good workaround, will check it out! Thanks

---

<div class="post-metadata">

**Author:** ![alexandergantikow](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@alexandergantikow](https://forum.getkirby.com/u/alexandergantikow)\
**Post date:** [February 24, 2022, 10:36am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/5 "2022-02-24T10:36:03Z")

</div>

Dear @texnixe ,

you said that…

> A files section can only have one parent page, you cannot query images from **multiple** pages.

I have a follow-up question about this: Is it possible to query files from a **single** subpage?  
I have the following use case: My “home” page shall have two image sliders. Thats why I have put the images into two seperate subfolders e.g. “home/carousel” and “home/gallery”. At first I was optimistic that I could create two sections in the panel to display the respective images with the query option. For the example of the “carousel”, I tried the following queries. Unfortunately, the panel only shows me the pictures of the “Home” father page.

```auto
query: page.children.find('carousel').images
query: site.find('home').children.find('carousel').children.images
query: site.find('home').children.find('carousel').images
query: site.find('home').children.images
query: page.children.images

```

In the template, I am able to retreive the carousel-images in the following way:

```auto
<?php $images = $page->children()->find('carousel')->images() ?>

```

Thanks in advance  
Alexander

---

<div class="post-metadata">

**Author:** ![alexandergantikow](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@alexandergantikow](https://forum.getkirby.com/u/alexandergantikow)\
**Post date:** [February 24, 2022, 11:05am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/6 "2022-02-24T11:05:15Z")

</div>

It seems that I was on the wrong track. I am now able to list the images of my subfolder “carousel” by using the “[parent](https://getkirby.com/docs/reference/panel/sections/files#filtering-files)” option.

```auto
parent: page.find("carousel")

```

---

<div class="post-metadata">

**Author:** ![Microman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/microman/32/15876_2.png) [@Microman](https://forum.getkirby.com/u/Microman)\
**Post date:** [November 12, 2022, 11:12am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/7 "2022-11-12T11:12:25Z")

</div>

Nice plugin. The composer doesn’t seems to work anymore. But still available via download.

Another question: How can you get files form site **and** all (sub)pages in **one** query?

```auto
site.index.files
site.files

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 12, 2022, 11:25am UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/8 "2022-11-12T11:25:38Z")

</div>

```auto
site.files.add(site.index.files)

```

If that doesn’t do the job, create a custom site method.

> [@Microman](#):
>
> The composer doesn’t seems to work anymore.

Thanks for letting me know, will look into it when I find the time.

---

<div class="post-metadata">

**Author:** ![Microman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/microman/32/15876_2.png) [@Microman](https://forum.getkirby.com/u/Microman)\
**Post date:** [November 12, 2022, 2:40pm UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/9 "2022-11-12T14:40:08Z")

</div>

That’s does the job:

`site.files.add(site.index.files)`

Thanks for your input, Sonja. 🙌

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 12, 2022, 2:58pm UTC](https://forum.getkirby.com/t/how-might-i-show-images-from-a-page-subfolder-in-the-panel/21095/10 "2022-11-12T14:58:45Z")

</div>

Oh dear, yes, corrected above… 🙈
