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