# Add caption to a file

**URL:** <https://forum.getkirby.com/t/add-caption-to-a-file/26477>\
**Category:** Questions\
**Tags:** v3\
**Created:** [September 14, 2022, 1:08pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477 "2022-09-14T13:08:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nirsh](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nirsh/32/11552_2.png) [@nirsh](https://forum.getkirby.com/u/nirsh)\
**Post date:** [September 14, 2022, 1:08pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/1 "2022-09-14T13:08:24Z")

</div>

Hi - I want to create a home page carousel gallery  
for that I use the files field.  
Now I upload files and it creates a nice gallery out of them. cool.

The problem is that I want to add a caption to each file in this gallery…  
How can I achieve this? (I don’t want to edit the file blueprint because I use the files field serves in other pages and functions)  
can I create a custom field, like the custom block?

I would appreciate any suggestions… !  
thanks

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [September 14, 2022, 1:14pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/2 "2022-09-14T13:14:47Z")

</div>

You can use file blue prints

> **[File blueprint](https://getkirby.com/docs/reference/panel/blueprints/file)**
>
> File blueprints are located in /site/blueprints/files and control the Panel setup and form fields for individual file types.

There you can use pretty all the same fields you do in a page blueprint.

Just noticed you are using file blueprints - can you give a little more info? Not sure why you cant use it in multiple places.

---

<div class="post-metadata">

**Author:** ![afplaktape](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@afplaktape](https://forum.getkirby.com/u/afplaktape)\
**Post date:** [September 14, 2022, 1:15pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/3 "2022-09-14T13:15:35Z")

</div>

You can create a different files blueprint specifically for the carousel and specify it in the blueprint for your carousel.

---

<div class="post-metadata">

**Author:** ![nirsh](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nirsh/32/11552_2.png) [@nirsh](https://forum.getkirby.com/u/nirsh)\
**Post date:** [September 14, 2022, 1:32pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/4 "2022-09-14T13:32:39Z")

</div>

Thanks for the replies!  
this is my home page yml file: home.yml

```auto
title: home

sections:
  gallery:
    type: fields
    fields:
      imgs:
        label: Images for home gallery
        type: files
        template: cover
        layout: cards
        image:
          cover: true
  projects:
    label: cases
    type: pages
    template: project

```

the imgs field in the gallery section is a files type. I want only for these files to add a caption.  
I use the files field in a different page too - there I want the files to have a different blueprint - a bit more complex. so I dont want all the files in the websites to have the same blueprint.

So - I created a file called cover.yml inside: ‘site-blueprints-files-cover.yml’  
this yml file looks like this:

```auto
title: cover

fields:
  caption:
  type: writer

```

but the file page in the panel still looks like this:

 ![Screen Shot 2022-09-14 at 4.36.41 PM](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/8/8efbb21e46bd608b6286255a3fc7da1ddc9851a7.jpeg)

any idea what am I doing wrong?  
I hope I am understood - thanks for the help!

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [September 14, 2022, 1:38pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/5 "2022-09-14T13:38:29Z")

</div>

On the files field on your other page you can set the name of the blueprint you want them to use

> **[Files](https://getkirby.com/docs/reference/panel/fields/files#upload-options__destination-and-template)**
>
> A files select field that allows to select one or multiple related files

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [September 14, 2022, 1:39pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/6 "2022-09-14T13:39:23Z")

</div>

> [@nirsh](#):
>
> ![Screen Shot 2022-09-14 at 4.36.41 PM](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/8/8efbb21e46bd608b6286255a3fc7da1ddc9851a7.jpeg)

That just means there isnt a default file blurprint it to fall back on.

---

<div class="post-metadata">

**Author:** ![nirsh](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nirsh/32/11552_2.png) [@nirsh](https://forum.getkirby.com/u/nirsh)\
**Post date:** [September 14, 2022, 1:47pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/7 "2022-09-14T13:47:53Z")

</div>

ok I got it now - I thought it didn’t work because I needed to delete the files and upload them again to see the changes.

It works now - Thank you for the help!

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [September 14, 2022, 1:50pm UTC](https://forum.getkirby.com/t/add-caption-to-a-file/26477/8 "2022-09-14T13:50:35Z")

</div>

> [@nirsh](#):
>
> ok I got it now - I thought it didn’t work because I needed to delete the files and upload them again to see the changes.

Yes - you can also open the text file for a file in a code editor if you are working locally and manually change the template key in there. Saves re-uploading.
