adds site image to search results

This commit is contained in:
buttle 2021-05-17 20:01:12 +02:00
parent 27be85cf29
commit c17aed359c
1 changed files with 22 additions and 0 deletions

View File

@ -3,6 +3,28 @@ $fulltextSearch = $this->params()->fromQuery('fulltext_search');
$hasResults = false; $hasResults = false;
?> ?>
<?php
$site->pages();
// set header images
//$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getPageImage($page);
$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 } ?>
<h2><?php echo sprintf($this->translate('Search results for “%s”'), $fulltextSearch); ?></h2> <h2><?php echo sprintf($this->translate('Search results for “%s”'), $fulltextSearch); ?></h2>
<div class="results"> <div class="results">