I have the following code
{menu}
{menuicon:user1}My
{compound-menuitem:userspace|icon=user1_earth|caption=Personal Space|checkexists=true}
{compound-menuitem:home|space=My|icon=presentation|caption=Personal Dashboard}
How can I add a class to "My"? When I try using a or something of the sort it doesn't work. The menu breaks and My doesn't appear any longer. When I use compound-menuitem I can't say that I don't want the link to actually go anywhere. Is this even the correct format (a title, for the drop down menu, that doesn't go anywhere) ? It works..
.png)








Comments (6)
Oct 29, 2008
David Matsumoto says:
Haven't tried it within a menu, but you might be able to use the span or div mac...Haven't tried it within a menu, but you might be able to use the span or div macros from the Content Formatting Plugin to apply the class.
Oct 29, 2008
ryan nauman says:
Both either don't work or break my menu. (I know i havent applied a class, the e...Both either don't work or break my menu. (I know i havent applied a class, the elements wont even show up...)
Examples:
1. {menu} {menuicon:user1}{span}My{span} {compound-menuitem:userspace|icon=user1_earth|caption=Personal Space|checkexists=true} 2. {menu} {menuicon:user1}{div}My{div} {compound-menuitem:userspace|icon=user1_earth|caption=Personal Space|checkexists=true} 3. {menu} {span}{menuicon:user1}My{span} {compound-menuitem:userspace|icon=user1_earth|caption=Personal Space|checkexists=true} 4. {menu} {div}{menuicon:user1}My{div} {compound-menuitem:userspace|icon=user1_earth|caption=Personal Space|checkexists=true}Oct 29, 2008
David Matsumoto says:
I'm surprised I would assume it would have inserted either way. It might have b...I'm surprised I would assume it would have inserted either way. It might have broken everything in doing so, but that is a different issue. Might be worth looking at the generated HTML to see how it is structured.
Oct 30, 2008
James Lowry says:
You can use {span:class=myclass}my{span} if you define the class in the cus...You can use
{span:class=myclass}my{span}if you define the class in the custom CSS it will be applied.
eg:
.myclass { font-size: x-large; color: red; }Oct 30, 2008
ryan nauman says:
Thanks James but that isn't the problem. The problem is when I add the span it r...Thanks James but that isn't the problem. The problem is when I add the span it ruins the menu. Maybe you could paste my code into a layout and then see what I mean.
Oct 30, 2008
Guy Fraser says:
Don't use a span - there's a subclass parameter on the menu, su-menu and sub-sub...Don't use a span - there's a subclass parameter on the menu, su-menu and sub-submenu macros IIRC for adding a class to the sub menu. Also, there's a class param which adds a class to the item itself.