adds image header to item page

This commit is contained in:
buttle 2021-05-17 22:18:06 +02:00
parent 136e495aee
commit 18e68ce308
1 changed files with 25 additions and 3 deletions

View File

@ -7,13 +7,35 @@ $itemMedia = $item->media();
$showLayout = $this->themeSetting('show_layout');
?>
<?php
$site->pages();
// set header image
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
if ($img_src) {
?>
<style>
#archive_header_img {
background:url("<?= $img_src ?>") no-repeat;
width:100%;
height:100px;
}
</style>
<?php } else { ?>
<style>
#archive_header_img {
display: none;
}
</style>
<?php } ?>
<div class="resource-title">
<?php echo $this->pageTitle($item->displayTitle(), 2); ?>
<h3 class="label"><?php echo $translate('Item'); ?></h3>
</div>
<div class="grid-x">
<?php if ($embedMedia && $itemMedia): ?>
<div class="media-embeds">
<?php foreach ($itemMedia as $media):
@ -46,7 +68,7 @@ endforeach;
</div>
<?php endif; ?>
</dl>
<?php
$page = $this->params()->fromQuery('page', 1);
$property = $this->params()->fromQuery('property');
@ -58,7 +80,7 @@ endforeach;
<?php echo $subjectValues; ?>
</div>
<?php endif; ?>
<?php $this->trigger('view.show.after'); ?>
</div>