AutorÃa | Ultima modificación | Ver Log |
<?php
$currentUser = $this->currentUserHelper();
$session_user_id = $currentUser->getUserId();
$session_usertype_id = $currentUser->getUserTypeId();
$acl = $this->viewModel()->getCurrent()->getVariable('acl');
$container = $this->navigation('backendNavigation')->getContainer();
?>
<nav>
<ul>
<?php foreach($container as $page) :
if(!$page || !$page->getRoute() || !$acl->isAllowed($session_usertype_id , $page->getRoute())) {
continue;
}
$childs = $page->getPages();
$href = $childs ? '#' : $page->getHref();
?>
<li>
<a href="<?php echo $href ?>" title="">
<span><i class="<?php echo $page->getClass() ?>"></i></span>
<?php echo $page->getLabel() ?>
</a>
<?php
$childs = $page->getPages();
if($childs) :
?>
<ul>
<?php foreach($childs as $child) :
if(!$acl->isAllowed($session_usertype_id , $child->getRoute())) {
continue;
}
?>
<li><a class="text-submenu" href="<?php echo $child->getHref() ?>" title=""><?php echo $child->getLabel() ?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</nav><!--nav end-->