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.

30 lines
1.6 KiB

5 years ago
  1. <?php
  2. if ($sideMenuItems = $this->getMenu($context->mainMenuCode)):
  3. $collapsedGroups = explode('|',
  4. isset($_COOKIE['sidenav_treegroupStatus'])
  5. ? $_COOKIE['sidenav_treegroupStatus']
  6. : null
  7. );
  8. ?>
  9. <ul class="top-level">
  10. <?php foreach ($sideMenuItems as $category => $items):
  11. $collapsed = in_array($category, $collapsedGroups); ?>
  12. <li data-group-code="<?= e($category) ?>" <?= $collapsed ? 'data-status="collapsed"' : null ?>>
  13. <div class="group">
  14. <h3><?= e(trans($category)); ?></h3>
  15. </div>
  16. <ul>
  17. <?php foreach ($items as $name => $item): ?>
  18. <?php $keywords = isset($item['keywords']) ? e(trans($item['keywords'])) : ''; ?>
  19. <li class="<?= $context->sideMenuCode == $name ? 'active' : null; ?>" data-keywords="<?= $keywords ?>">
  20. <a href="<?= isset($item['url']) ? $item['url'] : '#'; ?>">
  21. <i class="<?= isset($item['icon']) ? $item['icon'] : ''; ?>"></i>
  22. <span class="header"><?= isset($item['label']) ? e(trans($item['label'])) : '' ?></span>
  23. <span class="description"><?= isset($item['description']) ? e(trans($item['description'])) : '' ?></span>
  24. </a>
  25. </li>
  26. <?php endforeach ?>
  27. </ul>
  28. </li>
  29. <?php endforeach ?>
  30. </ul>
  31. <?php endif; ?>