Skip to content

Commit

Permalink
Fix lightgallery checks, show unsupported files.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimisgold committed Dec 21, 2022
1 parent b5e897d commit 636447d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions items/show.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
$linkToFileMetadata = get_option('link_to_file_metadata');
$title = metadata('item', 'display_title');
$itemFiles = $item->Files;
$lightGallery = $this->lightgallery($itemFiles);
queue_lightgallery_assets();
if ($itemFiles) {
$lightGallery = $this->lightgallery($itemFiles);
queue_lightgallery_assets();
} else {
$lightGallery = '';
}
echo head(array('title' => $title, 'bodyclass' => 'items show' . (($lightGallery !== '') ? ' gallery' : '')));
?>

Expand All @@ -24,6 +28,10 @@
<div class="item-metadata-content">

<?php echo all_element_texts('item'); ?>

<?php if ($itemFiles): ?>
<?php echo lightgallery_other_files($itemFiles); ?>
<?php endif; ?>

<?php if (metadata('item', 'Collection Name')): ?>
<div id="collection" class="element">
Expand All @@ -40,8 +48,6 @@
</div>
<?php endif;?>

<?php echo $this->lightGallery($itemFiles, false); ?>

<!-- The following prints a citation for this item. -->
<div id="item-citation" class="element">
<h3><?php echo __('Citation'); ?></h3>
Expand Down

0 comments on commit 636447d

Please sign in to comment.