Hi everyone,
is it possible to match the preview image of pages in the panel that contain a gallery with the gallery sorting?
I have a “residents”-page, with an overview of all residents. Each resident has the option to upload images in a gallery.
For the residents page in the panel, I’ve used a ‘pages’-section:
title: Residents
sections:
residents:
type: pages
layout: cards
status: listed
image:
ratio: 1/1
cover: true
So far the image shown seems to be the first image uploaded in the gallery of each child page.
This is the gallery of the resident’s Detail page:
right:
width: 1/2
sections:
gallery:
template: image
type: files
layout: cards
info: "{{ file.dimensions }}"
ratio: 1/1
max: 8
the files/images.yml:
title: Image
accept: image/*
fields:
alt:
type: text
width: 1/2
caption:
type: text
width: 1/2
The goal is, that when the user changes the order of the images in the gallery, the image shown in the ‘card’-layout of the detail pages adapts to that.
Here are screenshots where you can see, that the image of the bull (first one uploaded to the gallery) is in 5th position but appears as a preview image to the page in the card layout: