views:

133

answers:

1

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.

A: 

modChrome could modify the module content, but it would be better to use an HTML override for mod_mainmenu. The tricky thing is that the override is a bit complex. Here is a tutorial on how its done. (http://blog.opensourcenetwork.eu/tutorials/experienced/joomla-output-override-of-modmainmenu)

Secondly, you could just use the Extended Menu module instead and it should also be able to provide you the ability to edit the output structure. I would link to it but the site won't let me link to two sites yet. You can easily find it on the extensions directory.

gnomeontherun