Thumbnails for item using asset - Freedom Theme

In the browse navigation link items with no media don’t show an asset as the thumbnail, resulting in no thumbnails to be displayed. The Default theme does show asset thumbnails in the browse. For the Freedom theme is this the expected behavior? (Freedom 1.0.4, Omeka-S 4.1.0)

After reading the post Thumbnails ITEM SET Freedom Theme I modified view/omeka/site/item/browse.phtml for an item with no media to show an asset thumbnail.

Summary
diff --git a/view/omeka/site/item/browse.phtml b/view/omeka/site/item/browse.phtml
index e94daac..1dc8d88 100644
--- a/view/omeka/site/item/browse.phtml
+++ b/view/omeka/site/item/browse.phtml
@@ -109,13 +109,13 @@ if (is_array($decoration) && in_array('media', $decoration)) {
     <?php
     foreach ($items as $item):
         $body = $bodyTerm ? $item->value($bodyTerm, ['lang' => ($valueLang)]) : $item->displayDescription(null, ($valueLang));
-        $primaryMedia = $item->primaryMedia();
+        $thumbnail = $this->thumbnail($item, 'large');
         ?>
         <li class="item resource <?php echo ($isGrid) ? '' : 'media-object'; ?>">
             <!-- Thumbnail -->
-            <?php if ($primaryMedia): ?>
+            <?php if ($thumbnail): ?>
                 <div class="resource__thumbnail <?php echo $decorationClass; ?>">
-                    <?php echo $item->linkRaw($this->thumbnail($primaryMedia, 'large')); ?>
+                  <?php echo $item->linkRaw($thumbnail); ?>
                 </div>
             <?php endif; ?>

Hi @23AF, Thanks! I’m looking at this now and will keep you posted on the update to the main branch of the theme.

Hi @23AF, thanks again for reporting this issue and for contributing the solution. This fix is now in the master branch of the Freedom theme and willl be included in the next release this week.