From f58b75700c92564cdf3b49ee7619a7dd2b89a4ed Mon Sep 17 00:00:00 2001 From: buttle Date: Mon, 31 May 2021 11:11:20 +0200 Subject: [PATCH] fixes attachments --- README.md | 9 +++++---- src/View/Helper/HeaderImageViewHelper.php | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4107738..30fa656 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,22 @@ # HeaderImage media for Omeka S -[HeaderImage] is a module for [Omeka S] arcHIVE theme that adds -an image to the page above the main menu. +[HeaderImage] is a helper module for [Omeka S] arcHIVE theme. +This image is added above the page's main menu. ## Install ``` cd ./modules -https://git.hangar.org/arcHIVE-tech/HeaderImage-omeka-module/archive/main.zip +https://git.hangar.org/arcHIVE-tech/arc-hive-HeaderImage-omeka-module/archive/main.zip unzip main.zip -mv headerimage/ HeaderImage +mv arc-hive-headerimage-omeka-module HeaderImage rm main.zip ``` ## LISENCE The module is released under the [MIT] License. +[HeaderImage]: https://git.hangar.org/arcHIVE-tech/arc-hive-HeaderImage-omeka-module [arc-hive]: https://arc-hive.zone/ [Omeka S]: https://omeka.org/s [MIT]: http://opensource.org/licenses/MIT diff --git a/src/View/Helper/HeaderImageViewHelper.php b/src/View/Helper/HeaderImageViewHelper.php index cea6509..5bccec1 100644 --- a/src/View/Helper/HeaderImageViewHelper.php +++ b/src/View/Helper/HeaderImageViewHelper.php @@ -25,10 +25,10 @@ class HeaderImageViewHelper extends AbstractHelper foreach ($page->blocks() as $block) { if ($block->layout() === 'headerImage') { $attachments = $block->attachments(); - if ($$attachments) { + #if ($$attachments) { $media = $attachments[0]->item()->media()[0]; return $media->primaryMedia()->thumbnailUrl('large'); - } + #} } } $site = $this->currentSite();