icingaweb2/application/layouts/scripts/parts/menu.phtml

29 lines
645 B
PHTML

<ul>
<?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(),
array('class' => 'icon')
) . ' ' : '',
$this->escape($item->getTitle())
);
if ($item->hasChildren()) {
echo $this->partial(
'parts/menu.phtml',
array('items' => $item->getChildren(), 'url' => $this->url)
);
}
echo "</li>\n";
}
?>
</ul>