I need to extract menu items using module chrome from mainmenu module output:
<ul class="menu">
<li id="current" class="parent active item1"><a href=""><span>Menu item1</span></a>
<ul>
<li class="item1"><a href=""><span>Menu Item</span></a></li>
<li class="item2"><a href=""><span>Menu Item</span></a></li>
<li class="item3"><a href=""><span>Menu Item</span></a></li>
<li class="item4"><a href=""><span>Menu item</span></a></li></ul>
</ul>
and put them in this format:
<ul>
<li>
<a href="">menu item</a>
<div class="dropdown">
<div class="dropdown-wrapper">
<ul>
<li><a href="">menu item</a></li>
<li><a href="">menu item</a></li>
<li><a href="">menu item</a></li>
<li><a href="">menu item</a></li>
</ul>
What would be the way? Or is there a way to do it? Please, help.