You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
1.6 KiB

<?php
if ($sideMenuItems = $this->getMenu($context->mainMenuCode)):
$collapsedGroups = explode('|',
isset($_COOKIE['sidenav_treegroupStatus'])
? $_COOKIE['sidenav_treegroupStatus']
: null
);
?>
<ul class="top-level">
<?php foreach ($sideMenuItems as $category => $items):
$collapsed = in_array($category, $collapsedGroups); ?>
<li data-group-code="<?= e($category) ?>" <?= $collapsed ? 'data-status="collapsed"' : null ?>>
<div class="group">
<h3><?= e(trans($category)); ?></h3>
</div>
<ul>
<?php foreach ($items as $name => $item): ?>
<?php $keywords = isset($item['keywords']) ? e(trans($item['keywords'])) : ''; ?>
<li class="<?= $context->sideMenuCode == $name ? 'active' : null; ?>" data-keywords="<?= $keywords ?>">
<a href="<?= isset($item['url']) ? $item['url'] : '#'; ?>">
<i class="<?= isset($item['icon']) ? $item['icon'] : ''; ?>"></i>
<span class="header"><?= isset($item['label']) ? e(trans($item['label'])) : '' ?></span>
<span class="description"><?= isset($item['description']) ? e(trans($item['description'])) : '' ?></span>
</a>
</li>
<?php endforeach ?>
</ul>
</li>
<?php endforeach ?>
</ul>
<?php endif; ?>