fixes attachments
This commit is contained in:
parent
c736f6d3ff
commit
f58b75700c
|
@ -1,21 +1,22 @@
|
||||||
# HeaderImage media for Omeka S
|
# HeaderImage media for Omeka S
|
||||||
|
|
||||||
[HeaderImage] is a module for [Omeka S] arcHIVE theme that adds
|
[HeaderImage] is a helper module for [Omeka S] arcHIVE theme.
|
||||||
an image to the page above the main menu.
|
This image is added above the page's main menu.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
cd ./modules
|
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
|
unzip main.zip
|
||||||
mv headerimage/ HeaderImage
|
mv arc-hive-headerimage-omeka-module HeaderImage
|
||||||
rm main.zip
|
rm main.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
## LISENCE
|
## LISENCE
|
||||||
The module is released under the [MIT] License.
|
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/
|
[arc-hive]: https://arc-hive.zone/
|
||||||
[Omeka S]: https://omeka.org/s
|
[Omeka S]: https://omeka.org/s
|
||||||
[MIT]: http://opensource.org/licenses/MIT
|
[MIT]: http://opensource.org/licenses/MIT
|
||||||
|
|
|
@ -25,10 +25,10 @@ class HeaderImageViewHelper extends AbstractHelper
|
||||||
foreach ($page->blocks() as $block) {
|
foreach ($page->blocks() as $block) {
|
||||||
if ($block->layout() === 'headerImage') {
|
if ($block->layout() === 'headerImage') {
|
||||||
$attachments = $block->attachments();
|
$attachments = $block->attachments();
|
||||||
if ($$attachments) {
|
#if ($$attachments) {
|
||||||
$media = $attachments[0]->item()->media()[0];
|
$media = $attachments[0]->item()->media()[0];
|
||||||
return $media->primaryMedia()->thumbnailUrl('large');
|
return $media->primaryMedia()->thumbnailUrl('large');
|
||||||
}
|
#}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$site = $this->currentSite();
|
$site = $this->currentSite();
|
||||||
|
|
Loading…
Reference in New Issue