2014-06-20 15:02:19 +02:00
|
|
|
<?php
|
|
|
|
if (! $this->level) {
|
|
|
|
$this->level = 0;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<ul<?= $this->level === 0 ? ' role="navigation"' : '' ?>>
|
2014-02-18 19:23:03 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
foreach ($this->items as $item) {
|
|
|
|
|
|
|
|
printf(
|
|
|
|
' <li%s><a href="%s">%s%s</a>',
|
|
|
|
$this->href($this->url) === $this->href($item->getUrl()) ? ' class="active"' : '',
|
|
|
|
$item->getUrl() ? $this->href($item->getUrl()) : '#',
|
|
|
|
$item->getIcon() ? $this->img(
|
|
|
|
$item->getIcon(),
|
2014-03-17 16:54:40 +01:00
|
|
|
array('class' => 'icon')
|
2014-02-18 19:23:03 +01:00
|
|
|
) . ' ' : '',
|
2014-02-25 11:13:36 +01:00
|
|
|
$this->escape($item->getTitle())
|
2014-02-18 19:23:03 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
if ($item->hasChildren()) {
|
|
|
|
echo $this->partial(
|
|
|
|
'parts/menu.phtml',
|
2014-06-20 15:02:19 +02:00
|
|
|
array('items' => $item->getChildren(), 'url' => $this->url, 'level' => $this->level + 1)
|
2014-02-18 19:23:03 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "</li>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
</ul>
|