Hi there,
I’m using the new thumbnail system and I like it a lot. But the page_list block doesn’t support it. How do I add this? I’ve tried a few things but I’m lost. The code below is what I use to load images into the template.
<?php
$img = $c->getAttribute('thumbnail_news');
if ($img !== null) {
$imgVersion = $img->getVersion();
$thumbnailURL = $imgVersion->getThumbnailURL('thumbnail_news_hero');
?>
<img src="<?= $thumbnailURL ?>">
<?php
}
?>
But the page_list block uses this to load the thumbnail
if ($displayThumbnail) {
$thumbnail = $page->getAttribute('thumbnail_news');
}
<?php if (is_object($thumbnail)) {
?>
<div class="ccm-block-page-list-page-entry-thumbnail">
<?php
$img = Core::make('html/image', ['f' => $thumbnail]);
$tag = $img->getTag();
$tag->addClass('img-fluid');
echo $tag; ?>
</div>
<?php
} ?>