Hi,
I’m currently building a website which is very video heavy so I’m hoping to add thumbnails / previews to a files filed I’ve setup called ‘trailer’ by querying another files field I’ve setup called ‘poster’. I’ve tried setting up a query using ‘page.poster.toFile()’ but this isn’t working at this level (it does work on the parent page).
How would I go about grabbing the poster image and setting it as the preview for the trailer field which are within the same blueprint / page? Is this possible?
# Each page blueprint must have a title, the title may be different from the file name
title: Project
# Each page can have an icon that is shown in page listings when no preview image is available.
icon: 🖼
# Page status can be limited, here to `draft` and `listed`.
# More about page status: https://getkirby.com/docs/reference/panel/blueprints/page#statuses
status:
draft: true
listed: true
# Define the form layout with two columns
# More about different types of sections: https://getkirby.com/docs/reference/panel/sections
# More about columns: https://getkirby.com/docs/guide/blueprints/layout#defining-columns
columns:
- width: 2/3
sections:
trailer:
headline: Trailer
type: files
layout: cards
template: film-trailer
info: "{{ file.dimensions }}"
image:
query: page.poster.toFile
ratio: 16/9
cover: true
back: black
min: 1
size: large
- width: 1/3
fields:
poster:
label: Cover
type: files
multiple: false
required: false
layout: cards
size: medium
image:
ratio: 16/9
cover: true
Thank you,
Lewis