adds collection title to item and media pages

This commit is contained in:
buttle 2021-05-22 21:56:48 +02:00
parent 0cd4e6de39
commit d7dde0ddec
2 changed files with 31 additions and 0 deletions

View File

@ -28,10 +28,15 @@ if ($img_src) {
</style> </style>
<?php } ?> <?php } ?>
<script>
$("#archive_page_title").html('<?= $site->title(); ?>');
</script>
<!--
<div class="resource-title"> <div class="resource-title">
<?php echo $this->pageTitle($item->displayTitle(), 2); ?> <?php echo $this->pageTitle($item->displayTitle(), 2); ?>
</div> </div>
-->
<div class="grid-x"> <div class="grid-x">

View File

@ -3,6 +3,32 @@ $translate = $this->plugin('translate');
?> ?>
<?php $this->htmlElement('body')->appendAttribute('class', 'media resource show'); ?> <?php $this->htmlElement('body')->appendAttribute('class', 'media resource show'); ?>
<?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 } ?>
<script>
$("#archive_page_title").html('<?= $site->title(); ?>');
</script>
<div class="resource-title"> <div class="resource-title">
<?php echo $this->pageTitle($media->displayTitle(), 2); ?> <?php echo $this->pageTitle($media->displayTitle(), 2); ?>
<h3 class="label"><?php echo $translate('Media'); ?></h3> <h3 class="label"><?php echo $translate('Media'); ?></h3>