File blueprint template issue

Hi everyone,

I’m following the sample reference from Kirby’s Portfolio Example and have created a blueprint for a cover image, cover.yml, as follows:

title: Cover Image
extends: files/image

fields:
  alt:
    label: Alt Text
    type: text
  caption: 
    label: Caption
    type: textarea

I also have the following blueprints:

default.yml:

title: Default File

fields:
  alt:
    label: Alt Text
    type: text

image.yml:

title: Image

fields:
  alt:
    label: Alt Text
    type: text

In my project.yml, I’m using the cover template like this:

sidebar:
  width: 1/3
  sections:
    sidebar_content:
      type: fields
      fields:
        cover:
          template: cover
          label:
            en: Cover
            es: Portada
            pt: Capa
            it: Copertina
          type: files
          layout: cards
          info: "{{ file.dimensions }}"
          min: 1

However, the panel does not seem to recognize the cover template, and the the focus is disabled in the local installation but not in the server. :exploding_head:

Could anyone help me understand what might be going wrong?

Server: Kirby 4.3, Apache. Local: Kirby 4.3, nginx.

Thanks in advance!

A files field does not have a template property on that level, the template needs to be assigned under the uploads prop:

fields:
        cover:
          uploads: cover

or

fields:
  cover:
    uploads:
      template: cover

Hi, thanks. The focus return, but not enough the correct file template. I review each detail but not, not charge it.

      sidebar:
        width: 1/3
        sections:
          sidebar_content:
            type: fields
            fields:
              cover:
                uploads:
                  template: cover
                label:
                  en: Cover
                  es: Portada
                  pt: Capa
                  it: Copertina
                type: files
                layout: cards
                info: "{{ file.dimensions }}"
                min: 1
                max: 3

And the cover.yml blueprint, inside site/blueprints/files:

title: Cover Image
extends: files/image

fields:
  alt:
    label: Alt Text
    type: text
  caption: 
    label: Caption
    type: textarea 

and the image.yml:

title: Image

fields:
  alt:
    label: Alt Text
    type: text

and the default.yml:

title: Default File

fields:
  alt:
    label: Alt Text
    type: text

Now works, I want to force the change of template to images previously uploaded. Excuse me the confusion.