menu.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. ?>
  10. <?php //var_dump($categoryArr);
  11. ?>
  12. <div class="top_menu">
  13. <nav id="nav">
  14. <?php if(is_array($categoryArr) && !empty($categoryArr)): ?>
  15. <ul class="clearfix">
  16. <?php foreach($categoryArr as $category1): ?>
  17. <li>
  18. <a href="<?= $category1['url'] ?>" class="nav_t"><?= $category1['name'] ?></a>
  19. <?php $childMenu1 = isset($category1['childMenu']) ? $category1['childMenu'] : null; ?>
  20. <?php if(is_array($childMenu1) && !empty($childMenu1)): ?>
  21. <div class="sub_menu big_sub_menu clearfix">
  22. <div class="trends_item clearfix">
  23. <?php foreach($childMenu1 as $category2): ?>
  24. <dl>
  25. <dt><a href="<?= $category2['url'] ?>"><?= $category2['name'] ?></dt>
  26. <?php $childMenu2 = isset($category2['childMenu']) ? $category2['childMenu'] : null; ?>
  27. <?php if(is_array($childMenu2) && !empty($childMenu2)): ?>
  28. <?php foreach($childMenu2 as $category3): ?>
  29. <dd><a href="<?= $category3['url'] ?>"><?= $category3['name'] ?></a></dd>
  30. <?php endforeach; ?>
  31. <?php endif; ?>
  32. </dl>
  33. <?php endforeach; ?>
  34. </div>
  35. <div class="trends_img">
  36. <?= isset($category1['menu_custom']) ? $category1['menu_custom'] : ''; ?>
  37. </div>
  38. </div>
  39. <?php endif; ?>
  40. </li>
  41. <?php endforeach; ?>
  42. </ul>
  43. <?php endif; ?>
  44. <div class="nav_fullbg" style="display: none;"></div>
  45. <div class="navmask" style="display: none;"></div>
  46. </nav>
  47. </div>