prints pages with gived page_type

This commit is contained in:
buttle 2021-04-25 22:12:03 +02:00
parent 019537dcc7
commit 9adf17631d
3 changed files with 48 additions and 7 deletions

View File

@ -9,16 +9,26 @@ $layoutAttributes = [
'vertical' => 'class="vertical menu accordion-menu" data-accordion-menu data-submenu-toggle="true"',
]
?>
<?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);
?>
<?php if (!$this->navigation()->accept($page)) continue; ?>
<?php /* @var $page Zend\Navigation\Page\Mvc */ ?>
<?php $hasChildren = $page->hasPages() ?>
<?php $showChildren = $this->themeSetting('nav_show_levels'); ?>
<?php if (!$hasChildren || ($showChildren == 0)): ?>
<li<?php if ($page->isActive()) echo ' class="active"' ?>>
<a
class="nav-header"
<a
class="nav-header"
href="<?php echo $page->getHref() ?>"
<?php if ($page->getTarget() != ""): ?>
target="<?php echo $page->getTarget(); ?>"
@ -56,7 +66,7 @@ $layoutAttributes = [
endif;
?>
<li<?php if ($child->isActive()) echo ' class="active"' ?>>
<a
<a
href="<?php echo $child->getHref() ?>"
<?php if ($child->getTarget() != ""): ?>
target="<?php echo $child->getTarget(); ?>"
@ -69,7 +79,7 @@ $layoutAttributes = [
</li>
<?php endforeach ?>
</ul>
</li>
</li>
<?php endif; ?>
<?php endif ?>
<?php endforeach ?>

View File

@ -6,7 +6,7 @@ $this->headMeta()->setCharset('utf-8');
$this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1');
$this->headTitle($this->setting('installation_title', 'Omeka S'))->setSeparator(' · ');
if (isset($stylesheet)) {
$this->headLink()->prependStylesheet($this->assetUrl("css/$stylesheet.css"));
$this->headLink()->prependStylesheet($this->assetUrl("css/$stylesheet.css"));
} else {
$this->headLink()->prependStylesheet($this->assetUrl('css/default.css'));
}
@ -43,7 +43,8 @@ endif;
</head>
<?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">
@ -60,9 +61,11 @@ endif;
<?php echo $this->partial('common/header-dropdown'); ?>
<?php endif; ?>
</header>
<div id="content" role="main">
<?php echo $this->content; ?>
</div>
<footer>
<?php if ($footerContent = $this->themeSetting('footer')): ?>
<?php echo $footerContent; ?>

View File

@ -4,6 +4,7 @@ $this->pageTitle($page->title(), 2);
$showPagePagination = $this->siteSetting('show_page_pagination', true);
?>
<?php
$nav = $site->publicNav();
$container = $nav->getContainer();
@ -15,6 +16,33 @@ if ($activePage):
<?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;
*/
?>
<!-- archive menu -->
<?php echo $this->partial('common/search-form'); ?>
<?php echo $nav->menu()->renderSubMenu(); ?>
<?php if ($activePage): ?>
<?php if ($this->displayNavigation && $activePage['page']->hasPages()): ?>
<nav class="sub-menu wide" data-sticky-container>
@ -25,13 +53,13 @@ if ($activePage):
<?php endif; ?>
<?php endif; ?>
<?php $this->trigger('view.show.before'); ?>
<div id="blocks" class="blocks">
<?php echo $this->content; ?>
</div>
<?php $this->trigger('view.show.after'); ?>
<?php if ($showPagePagination): ?>
<?php echo $this->sitePagePagination(); ?>