I want to display the product thumbnails in the panel, similar to Starterkit. However, the thumbnails don’t show up, it shows the icon instead. The thumbnails render nicely on the front-end.
Thats an odd one. Since your thumbs are ok on the front end, seems like the generation went ok. Guessing it not a server issue.
I dont suppose you have an ad blocker installed in your browser? You may have hit a common advert size by pure fluke, and the blocker could be hiding them.
I am maybe missing something but custom thumbnail does not work for me:
sections/film.yml
type: pages
headline: Films
info: "{{ page.date.toDate('d.m.Y') }}"
template: film
empty: No content yet
sortBy: date desc
image: page.image.findBy("name", "cover")
page/film.yml
title: Film
num: '{{ page.date.toDate("Ymd") }}'
status:
draft:
label: Draft
text: The article is still in draft mode. It can only be seen by editors with panel access.
listed:
label: Published
text: The article is online and listed in the blog
columns:
main:
width: 2/3
fields:
cover: # <-- this field should be used for thumbnail
label: Image de couverture
type: files
layout: cards
template: image
info: "{{ file.dimensions }}"
image:
ratio: 16/9
cover: true
max: 1
size: large
...
Thanks ! page.cover.toFile() works.
Just to understand what I was doing wrong, why does this work and page.image.findBy("name","cover") taken from the doc doesn’t ?
Ok thanks, I think there is a misunderstanding between page.image that is working and page.image.findBy(...) that is not, I thought .findBy() was a kind of filter for all images in the page…
Wrong image is being displayed in the cover image option, how can i fix this issue? here is the image query in the blueprint:
page.images.template(“cover”).first