menuLeft.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <div class="sidebar-main">
  2. <div class="box-top">
  3. CATEGORY
  4. </div>
  5. <div class="box-main">
  6. <?php if(is_array($categoryArr) && !empty($categoryArr)): ?>
  7. <?php foreach($categoryArr as $category1): ?>
  8. <?php $childMenu1 = isset($category1['childMenu']) ? $category1['childMenu'] : null; ?>
  9. <?php if(is_array($childMenu1) && !empty($childMenu1)): ?>
  10. <ul class="navMenu">
  11. <li class="afinvee">
  12. <a href="<?=$category1['url']?>" class="afinve"> <span><?=$category1['name']?></span> <span class="arrow"></span> </a> <i class="fa fa-chevron-down"></i>
  13. <ul class="sub-menu" style="display: none;">
  14. <?php foreach($childMenu1 as $category2): ?>
  15. <?php $childMenu2 = isset($category2['childMenu']) ? $category2['childMenu'] : null; ?>
  16. <li class="">
  17. <a href="<?= $category2['url'] ?>" class="afinve"><span><?= $category2['name'] ?></span><span class="arrow"></span></a>
  18. <?php if(is_array($childMenu2) && !empty($childMenu2)): ?>
  19. <i style="float: right; margin-right: 5px; cursor: pointer;" class="">+</i>
  20. <?php endif ?>
  21. <?php if(is_array($childMenu2) && !empty($childMenu2)): ?>
  22. <ul class="sub-menu" style="display: none;">
  23. <?php foreach($childMenu2 as $category3): ?>
  24. <li class="son">
  25. <span class="price">
  26. <a href="<?=$category3['url']?>"><?=$category3['name']?></a>
  27. </span>
  28. </li>
  29. <?php endforeach ?>
  30. </ul>
  31. <?php endif ?>
  32. </li>
  33. <?php endforeach ?>
  34. </ul>
  35. </li>
  36. </ul>
  37. <?php else: ?>
  38. <?php if($category1['name']!='Home'):?>
  39. <dl style="padding: 0;">
  40. <dt>
  41. <a href="<?= $category1['url'] ?>"><?= $category1['name'] ?></a>
  42. </dt>
  43. </dl>
  44. <?php endif; ?>
  45. <?php endif; ?>
  46. <?php endforeach ?>
  47. <?php endif?>
  48. </div>
  49. </div>