yellow/system/layouts/sidebar.html

22 lines
907 B
HTML
Raw Normal View History

2019-02-23 14:04:34 +00:00
<?php if ($this->yellow->page->isPage("sidebar")): ?>
2019-02-01 16:36:29 +00:00
<div class="sidebar" role="complementary">
2019-02-23 14:04:34 +00:00
<?php $page = $this->yellow->page->getPage("sidebar") ?>
<?php $page->setPage("main", $this->yellow->page) ?>
2019-02-01 16:36:29 +00:00
<?php echo $page->getContent() ?>
</div>
2019-02-23 14:04:34 +00:00
<?php elseif ($this->yellow->page->isPage("navigation-sidebar")): ?>
<div class="sidebar" role="complementary">
2016-11-01 18:46:47 +00:00
<div class="navigation-sidebar">
2019-02-23 14:04:34 +00:00
<?php $page = $this->yellow->page->getPage("navigation-sidebar") ?>
2019-02-01 16:36:29 +00:00
<?php $pages = $page->getChildren(!$page->isVisible()) ?>
2019-02-23 14:04:34 +00:00
<?php $this->yellow->page->setLastModified($pages->getModified()) ?>
2016-11-01 18:46:47 +00:00
<p><?php echo $page->getHtml("titleNavigation") ?></p>
<ul>
2019-02-01 16:36:29 +00:00
<?php foreach ($pages as $page): ?>
2016-11-01 18:46:47 +00:00
<li><a<?php echo $page->isActive() ? " class=\"active\"" : "" ?> href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("titleNavigation") ?></a></li>
<?php endforeach ?>
</ul>
</div>
</div>
<?php endif ?>