A table displaying a list of items with their corresponding details is shown below:
ItemID MENU ParentID ImgUrl
----------- -------------------- ----------- -----------
1 Home 0
2 Products 0
3 Categories 0
5 Products 1 2
6 Products 2 2
7 Products 3 2
8 Products 2 1 6
9 Categories 1 3 img1.jpg
10 Categories 2 3 img2.jpg
I am looking to create a nested menu similar to the one found at:
<!-- BEGIN NAVIGATION -->
<div class="header-navigation">
<ul>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">Woman</a>
<!-- BEGIN DROPDOWN MENU -->
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="shop-product-list.html">Hi Tops <i class="fa fa-angle-right"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="shop-product-list.html">Second Level Link</a></li>
<li><a href="shop-product-list.html">Second Level Link</a></li>
<li class="dropdown-submenu">
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">Second Level Link
<i class="fa fa-angle-right"></i>
</a>
<ul class="dropdown-menu">
<li><a href="shop-product-list.html">Third Level Link</a></li>
<li><a href="shop-product-list.html">Third Level Link</a></li>
<li><a href="shop-product-list.html">Third Level Link</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="shop-product-list.html">Running Shoes</a></li>
<li><a href="shop-product-list.html">Jackets and Coats</a></li>
</ul>
<!-- END DROPDOWN MENU -->
</li>
<li class="dropdown dropdown-megamenu">
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">Man </a>
<ul class="dropdown-menu">
<li>
...
</ul>
</li>
<li><a href="shop-item.html">Kids</a></li>
<li class="dropdown dropdown100 nav-catalogue">
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">New
...
<!-- END NAVIGATION -->
I have a theme that requires filling the menu, specifically focusing on women and men categories, with endless nested `ul` > `li` menus. If the child menu items have images, they should be displayed as well.
Using ASP repeater or other inefficient methods is not an option for me. What would be the most effective approach to achieve this?