menu.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <div class="magicmenu">
  2. <?php if(is_array($categoryArr) && !empty($categoryArr)): ?>
  3. <ul class="nav-desktop">
  4. <?php foreach($categoryArr as $category1): ?>
  5. <?php $childMenu1 = isset($category1['childMenu']) ? $category1['childMenu'] : null; ?>
  6. <li class="level0">
  7. <a href="<?= $category1['url'] ?>" class="level-top 1">
  8. <span class="nav-text"><?= $category1['name'] ?></span>
  9. </a>
  10. <?php if(is_array($childMenu1) && !empty($childMenu1)): ?>
  11. <div class="level-top-mega" style="left:55%;">
  12. <div class="content-mega">
  13. <div class="content-mega-horizontal">
  14. <ul class="level0 mage-column cat-mega">
  15. <?php foreach($childMenu1 as $category2): ?>
  16. <li class="children level1">
  17. <a style="color:#c7c4c4;" href="<?= $category2['url'] ?>">
  18. <span><?= $category2['name'] ?></span>
  19. </a>
  20. <?php $childMenu2 = isset($category2['childMenu']) ? $category2['childMenu'] : null; ?>
  21. <?php if(is_array($childMenu2) && !empty($childMenu2)): ?>
  22. <ul class="level1 submenu">
  23. <?php foreach($childMenu2 as $category3): ?>
  24. <li class="level2">
  25. <a href="<?= $category3['url'] ?>"><span><?= $category3['name'] ?></span></a>
  26. </li>
  27. <?php endforeach ?>
  28. </ul>
  29. <?php endif ?>
  30. </li>
  31. <?php endforeach ?>
  32. </ul>
  33. </div>
  34. </div>
  35. </div>
  36. <?php endif ?>
  37. </li>
  38. <?php endforeach ?>
  39. </ul>
  40. <?php endif?>
  41. </div>