Structure field & multiple images preview

Is there a way to display several images with a preview in a structure field after editing?
Right now the filenames are stored with a comma separation, so

      entry: >
            <img src="{{_fileUrl}}{{picture}}" height=120px/></br>

won’t work.

Unfortunately, there is no inbuilt solution for this. You cannot use any logic in the entry field.

Too bad. Thanks for the answer!

You could try to create your own custom structure field and adapt the entry part to suit your requirements.

Thanks. So i guess this is the document i need to read?
https://getkirby.com/docs/panel/developers/custom-form-fields

Yes, and probably the source code in /panel/app/fields …

You can do this but it requires that you hard-code the URI, so it’s not super flexible.

  client_logos:
    label: Client Logos
    type: structure
    entry: <img src="/home/{{logo_image}}">
    fields:
      logo_image:
        label: Image
        type: selector
        mode: single
        size: 4
        options:
          - image

plus a bit of custom CSS:

You cannot do that with a comma separated list of images, though, @SQBiz; at least that is what I think @possible_books was asking if I got it right …

Yes, you got it right. I would like to display several images in one structure field.

The plugin PageBuilder has a solution and extended the preview in the panel:

The builder field, just like the structure field, allows you to define some markup in teh blueprint’s entry field to preview the content. The builder field extends this feature with the {{_fileUrl}} variable, to display images in the preview:

entry: >
	      <img src="{{_fileUrl}}{{picture}}" height=120px/></br>
	      {{url}}

there is a path to a panel-template?

snippet: builder/imagebanner

@dersven I don’t quite understand your question. You want to link to a template in the entry itself instead of using the snippet option? If so, why?

jepp exactly. but there is no option for the panel elements?
i thought it would be clearly and not so full of code-things.

for a slider i want to display the images and the text for the editor. its more nixer in the backend.

Well, yes, you can show the image and you can refer to individual fields with the field name in the double curly brackets. Other than that I’m not sure what you mean with Panel elements.