adds image to header
This commit is contained in:
parent
9adf17631d
commit
e1e1e7dd50
|
@ -10,17 +10,11 @@ $layoutAttributes = [
|
|||
]
|
||||
?>
|
||||
|
||||
<?php $page_count = 0; ?>
|
||||
|
||||
<ul <?php echo $layoutAttributes[$layout]; ?>>
|
||||
<?php foreach ($container as $page): ?>
|
||||
<?php
|
||||
$page_count++;
|
||||
if ($page_count == 1) {
|
||||
echo("First page");
|
||||
}
|
||||
echo($page);
|
||||
?>
|
||||
|
||||
<?= $page->id; ?>
|
||||
|
||||
<?php if (!$this->navigation()->accept($page)) continue; ?>
|
||||
<?php /* @var $page Zend\Navigation\Page\Mvc */ ?>
|
||||
<?php $hasChildren = $page->hasPages() ?>
|
||||
|
|
|
@ -44,7 +44,6 @@ endif;
|
|||
|
||||
<?php echo $this->htmlElement('body'); ?>
|
||||
|
||||
|
||||
<div id="offCanvas" class="off-canvas position-left" data-off-canvas>
|
||||
<?php echo $site->publicNav()->menu()->setPartial('common/foundation-navigation.phtml')->renderPartialWithParams(['layout' => 'vertical']); ?>
|
||||
<div class="search">
|
||||
|
@ -52,8 +51,36 @@ endif;
|
|||
</div>
|
||||
</div>
|
||||
<div class="off-canvas-content" data-off-canvas-content>
|
||||
|
||||
<a id="skipnav" href="#content"><?php echo $this->translate('Skip to main content'); ?></a>
|
||||
<?php echo $userBar; ?>
|
||||
|
||||
<img id="archive_header_img" />
|
||||
|
||||
<?php
|
||||
//echo $page;
|
||||
//echo $this->container;
|
||||
/*
|
||||
foreach ($this->container as $page) {
|
||||
print($page->id);
|
||||
}
|
||||
*/
|
||||
/*
|
||||
$nav = $site->publicNav();
|
||||
$container = $nav->getContainer();
|
||||
$activePage = $nav->findActive($container);
|
||||
|
||||
$slug = $activePage['page']->getParams()['page-slug'];
|
||||
print($slug);
|
||||
foreach ($activePage['page']->getParams() as $key => $param) {
|
||||
print($key.' '.$param);
|
||||
}
|
||||
#$page_id = $activePage->id();
|
||||
#print($page_id);
|
||||
*/
|
||||
//$header_image = $this->getHelperPluginManager()->get('pageMeta')->getMetaImage($this);
|
||||
?>
|
||||
|
||||
<header>
|
||||
<?php if ($navLayout == 'vertical'): ?>
|
||||
<?php echo $this->partial('common/header-vertical'); ?>
|
||||
|
@ -62,6 +89,7 @@ endif;
|
|||
<?php endif; ?>
|
||||
</header>
|
||||
|
||||
|
||||
<div id="content" role="main">
|
||||
<?php echo $this->content; ?>
|
||||
</div>
|
||||
|
|
|
@ -5,6 +5,28 @@ $showPagePagination = $this->siteSetting('show_page_pagination', true);
|
|||
?>
|
||||
|
||||
|
||||
<?php
|
||||
// set header images
|
||||
$img_src = $this->getHelperPluginManager()->get('pageMeta')->getMetaImage($page);
|
||||
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 } ?>
|
||||
|
||||
<?= $page->id(); ?>
|
||||
|
||||
<?php
|
||||
$nav = $site->publicNav();
|
||||
$container = $nav->getContainer();
|
||||
|
@ -12,35 +34,30 @@ $activePage = $nav->findActive($container);
|
|||
if ($activePage):
|
||||
?>
|
||||
<?php if ($activePage['depth'] !== 0): ?>
|
||||
<nav class="breadcrumbs"><?php echo $nav->breadcrumbs()->setPartial('common/foundation-breadcrumbs'); ?></nav>
|
||||
<nav class="breadcrumbs">
|
||||
<?php echo $nav->breadcrumbs()->setPartial('common/foundation-breadcrumbs'); ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$pages = $this->getHelperPluginManager()->get('pageMeta')->getPages('exhibit');
|
||||
|
||||
foreach ($pages as $key => $value) {
|
||||
print($key);
|
||||
print('<br />');
|
||||
print("--".$value."--");
|
||||
print('<br />');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
$pagesMetadata = $plugins->has('pagesMetadata') ? $plugins->get('pagesMetadata') : null;
|
||||
if ($pagesMetadata):
|
||||
$data = $pagesMetadata('exhibit_page');
|
||||
endif;
|
||||
*/
|
||||
|
||||
$pages = $this->getHelperPluginManager()->get('pageMeta')->getPages('exhibit');
|
||||
foreach ($pages as $key => $value) {
|
||||
print($key);
|
||||
print('<br />');
|
||||
print("--".$value."--");
|
||||
print('<br />');
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- archive menu -->
|
||||
<?php echo $this->partial('common/search-form'); ?>
|
||||
<?php echo $nav->menu()->renderSubMenu(); ?>
|
||||
<?php
|
||||
/*
|
||||
echo $this->partial('common/search-form');
|
||||
echo $nav->menu()->renderSubMenu();
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
<?php if ($activePage): ?>
|
||||
|
|
Loading…
Reference in New Issue