# Global Datamanager in panel interface

**URL:** <https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890>\
**Category:** Questions\
**Tags:** v3\
**Created:** [October 29, 2022, 7:58pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890 "2022-10-29T19:58:38Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 29, 2022, 7:58pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/1 "2022-10-29T19:58:38Z")

</div>

Hi there,

is it possible to make every used file globally available in the panel? Just like in Wordpress or Shopware.

Currently i use the following as a query for the files in my blueprints, but obviously this only returns the files i have already used in this specific context.

```auto
query: page.images

```

Also the following, does obviously only return the files i used in the site.yml:

```auto
query: site.images

```

greetings

---

<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, 8:12pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/2 "2022-10-29T20:12:07Z")

</div>

To query all images uploaded to any page, you can use

```auto
query: site.index.images

```

Querying the site index is usually discouraged, though, at least on large sites.

---

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 29, 2022, 10:05pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/3 "2022-10-29T22:05:01Z")

</div>

Many Thanks!  
Yeah i know, this could get messy. But for smaller sites, it is nice to have all images available, i will think about that.

---

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 29, 2022, 10:26pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/4 "2022-10-29T22:26:47Z")

</div>

So i decided to create a tab in the site.yml which acts like datamanager to have e.g a overview of all images, and maybe have the possibility to swap them or download it.

I tried to achive it like that, which is obviously not working, but is smth like this even possible?

```auto
files:
  type: files
  default: site.index.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:** [October 29, 2022, 10:46pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/5 "2022-10-29T22:46:27Z")

</div>

Is that a files section or a field? I guess a field because of the default. But defaults don’t work in site.yml because defaults are only considered when a new page is created.

I wonder if it wouldn’t make sense for your use case to put all files into a dedicated central files folder and query from there in all pages.

---

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 29, 2022, 11:43pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/6 "2022-10-29T23:43:55Z")

</div>

so i could define a folder and use the ‘uploads:’ property to store the uploaded files there and after that i should call them in a files field.  
I didnt really find any documentation to create smth like this and didnt find much about how to tweak the ‘uploads:’ property to reffer to a custom folder. Do you have some tips about the syntax for this?

---

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 30, 2022, 7:38pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/7 "2022-10-30T19:38:37Z")

</div>

Hi, i still didn’t find a good solution for creating the behavior i described in my last reply, is there any instruction online to create something similar to 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 30, 2022, 7:48pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/8 "2022-10-30T19:48:29Z")

</div>

As I wrote above, create a new folder inside the content folder (e.g. files or whatever). In your files fields, set the query [to query the files from that page](https://getkirby.com/docs/reference/panel/fields/files#querying-files__querying-files-from-other-pages). Same for the `uploads` destination: [Files | Kirby CMS](https://getkirby.com/docs/reference/panel/fields/files#upload-options__destination-and-template)

If you don’t want a separate folder, you can also store all files directly in the content folder next to `site.txt`. That makes all images belong to the $site object.

---

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 30, 2022, 8:34pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/9 "2022-10-30T20:34:50Z")

</div>

I see, this works fine for fields, but i want to create a list of files, which i have to do with the section ‘files’ i guess. But i didn’t found out, how to create a query for the section, because the property doesn’t exist. I tried it with parent, but didn’t found out, how to use this to create a similar query.

---

<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 30, 2022, 8:46pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/10 "2022-10-30T20:46:15Z")

</div>

That’s right, you cannot use a query in a section, but only a parent

```auto
filessection:
  type: files
  parent: site.find('files') # or whatever the page name you use

```

---

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 30, 2022, 9:08pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/11 "2022-10-30T21:08:32Z")

</div>

I see this works pretty well. I know have adjusted the uploads property in my blueprints, to make the files globally available:

```auto
uploads: 
  parent: site.find('files')

```

It would be perfect the file would be available in the files folder an aswell in the current page folder like it works in default.

Sadly ‘parent:’ aspects a String, so i think i can’t realise a double upload via. the blueprint.

Also I thought about not using a ‘files’ and do something like this (but sadly this only works in fields and not in the section):

```auto
filessection:
  type: files
  parent: site.index.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:** [October 30, 2022, 9:19pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/12 "2022-10-30T21:19:05Z")

</div>

If the section doesn’t need an upload, then you could use my filesdisplay section plugin:

> **[FilesDisplay Section](https://getkirby.com/plugins/texnixe/filesdisplay-section)**
>
> Display files from anywhere in your site in a section. This section only displays files, you cannot sort them manually or upload new files.

Allows you to use a query.

---

<div class="post-metadata">

**Author:** ![Khepri.Design](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/khepri.design/32/13857_2.png) [@Khepri.Design](https://forum.getkirby.com/u/Khepri.Design)\
**Post date:** [October 30, 2022, 9:25pm UTC](https://forum.getkirby.com/t/global-datamanager-in-panel-interface/26890/13 "2022-10-30T21:25:18Z")

</div>

Exactly what i need, thank you very much
