# Images to be referenced (used) by multiple pages

**URL:** <https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874>\
**Category:** Questions\
**Created:** [October 28, 2022, 3:33pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874 "2022-10-28T15:33:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcodyb](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jcodyb/32/12554_2.png) [@jcodyb](https://forum.getkirby.com/u/jcodyb)\
**Post date:** [October 28, 2022, 3:33pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/1 "2022-10-28T15:33:31Z")

</div>

General question here as I’m learning Kirby to see if it’ll work for my situation:  
I have images that will have multiple tags (or some other taxonomy in their metadata) and then create pages (galleries basically) for each tag that load images if they have the relevant tags. Ultimately I’d love to just tag each image and then have pages automatically created for each tag, but one step at a time.

If I find the images via php, I’d have to make separate templates for each page? Is that correct? I’m looking at lots of templates if that’s the case. For security reasons a php snippet can’t be loaded in the page somehow?

---

<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:** [October 28, 2022, 3:39pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/2 "2022-10-28T15:39:26Z")

</div>

> [@jcodyb](#):
>
> If I find the images via php, I’d have to make separate templates for each page?

No. You could create a single template, and in the controller for that template filter your images by tag. The url could look either like this:

```auto
mydomain.com/gallery/tag: sometag

```

so really using a parameter

Or you could do it via a route with a url like this

```auto
mydomain/gallery/sometag

```

where sometag is just a placeholder for the actual dynamic tags.

---

<div class="post-metadata">

**Author:** ![jcodyb](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jcodyb/32/12554_2.png) [@jcodyb](https://forum.getkirby.com/u/jcodyb)\
**Post date:** [October 28, 2022, 4:41pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/3 "2022-10-28T16:41:52Z")

</div>

If I’m understanding correctly (pardon my minimal knowledge about how this works) the URL method would autogenerate a viewable page based on the tag, but wouldn’t actually create any pages within the content structure right? I assume I could still make a page that lists the tags as if they were pages…  
Thanks I’ll need some time to digest all of this-

---

<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:** [October 28, 2022, 4:50pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/4 "2022-10-28T16:50:40Z")

</div>

You would only need one page (the gallery page), the rest would be handled via the URL parameter, no pages in the file system needed, exactly.

It would basicall work like these examples, but for files instead of pages

> **[Filter collections by tags](https://getkirby.com/docs/cookbook/content/filtering-with-tags)**
>
> Classify content and make it easy for visitors to find related content.

> **[Filtering via routes](https://getkirby.com/docs/cookbook/content/filter-via-route)**
>
> Learn how to filter using routes instead of parameters

---

<div class="post-metadata">

**Author:** ![jcodyb](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jcodyb/32/12554_2.png) [@jcodyb](https://forum.getkirby.com/u/jcodyb)\
**Post date:** [October 29, 2022, 12:12am UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/5 "2022-10-29T00:12:03Z")

</div>

I think I’m very close now but I’m missing some specific command. Currently I have this in the photographer template to show all their photos:

```auto
<?php $currentPhotog = $page->photog(); ?>
<?php $gallery = $site->find('2022')->children()->images()->filterBy('Photographer', $currentPhotog)->sortBy('sort', 'filename'); ?>

```

And that works if I specify the “2022” page, but is there something I can use there instead to search all children of the entire site and not one specific parent page?

---

<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:** [October 29, 2022, 6:43am UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/6 "2022-10-29T06:43:00Z")

</div>

Yes, $site-\>index()

---

<div class="post-metadata">

**Author:** ![jcodyb](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jcodyb/32/12554_2.png) [@jcodyb](https://forum.getkirby.com/u/jcodyb)\
**Post date:** [October 29, 2022, 3:40pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/7 "2022-10-29T15:40:23Z")

</div>

Thank you-  
I have one other unrelated question if that’s ok:  
Coming from Wordpress I’m used to managing all content through the web dashboard. I read that with kirby it’s not recommended to use the panel via the web. How do people use it then?

---

<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:** [October 29, 2022, 4:45pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/8 "2022-10-29T16:45:28Z")

</div>

Where did you read that? Of course you can use the Panel through the web, that’s why the Panel exists.

---

<div class="post-metadata">

**Author:** ![jcodyb](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jcodyb/32/12554_2.png) [@jcodyb](https://forum.getkirby.com/u/jcodyb)\
**Post date:** [October 29, 2022, 4:49pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/9 "2022-10-29T16:49:19Z")

</div>

Oh maybe I misunderstood. In the docs it says you cannot install the panel on a public server by default, and “It’s recommended to remove this setting after the installation on your remote server is complete.”

---

<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:** [October 29, 2022, 5:13pm UTC](https://forum.getkirby.com/t/images-to-be-referenced-used-by-multiple-pages/26874/10 "2022-10-29T17:13:17Z")

</div>

That‘s a security feature that prevents that just anybody can install the Panel on a public server in case the admin forgot to set it up.
