level) {
$this->level = 0;
}
?>
level === 0 ? ' role="navigation"' : '' ?>>
items as $item) {
printf(
' - %s%s',
$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, 'level' => $this->level + 1)
);
}
echo "
\n";
}
?>