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

29 lines
645 B
PHTML
Raw Normal View History

2014-02-18 19:23:03 +01:00
<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')
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',
array('items' => $item->getChildren(), 'url' => $this->url)
);
}
echo "</li>\n";
}
?>
</ul>