Modifying mod_mainmenu output

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
User avatar
madsamurai
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Tue Oct 02, 2007 6:13 pm

Modifying mod_mainmenu output

Post by madsamurai » Wed Nov 07, 2007 4:10 pm

I've been trying for weeks to get a decent dropline menu happening that works across all browsers. I've tried a few different methods, each of which works to some extent, but generally fails one browser or another.

My new hero, Stu Nicholls at cssplay.co.uk has got one that works beautifully, but it requires some special html code.  I would like to create a duplicate of the mod_mainmenu module and modify it to create the following list structure:

Code: Select all

<ul class="current">
    <li><a href="#nogo"><b>John Constable</b><!--[if IE 7]><!--></a><!--<![endif]-->
    <!--[if lte IE 6]><table><tr><td><![endif]-->
    <div class="select_sub show">
        <ul class="sub">
       <li><a href="#nogo">The Hay Wain</a></li>
            <li><a href="#nogo">Brighton Beach</a></li>
            <li><a href="#nogo">Malvern Hall</a></li>
            <li class="sub_show"><a href="#nogo">Salisbury Cathedral</a></li>
            <li><a href="#nogo">Weymouth Bay</a></li>
   </ul>
</div>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>

rather than the standard unordered list output it generates, but looking at the code for that module, I can't figure out where those extra commented blocks and div tags would get added in.

I'm afraid I'm on a deadline, and having had to try so many other methods I'm too far behind now to be stabbing in the dark, so I really hope someone can help me out.

Thanks in advance!
Last edited by madsamurai on Wed Nov 07, 2007 5:17 pm, edited 1 time in total.

Post Reply