>
> the default MENU helper sets the class for the outer UL elements to 
> "sf-menu". There are optional arguments to set the class of the inner 
> UL and LI elements. What I need is a way to set the class for the 
> first level (outer) LI element. Is there any way to do this other than 
> using JavaScript/jQuery, i.e. with arguemtns?
>

Actually, the default class for the outer UL is "web2py-menu 
web2py-menu-vertical". It is explicitly set to "sf-menu" in layout.html of 
the "welcome" app (so it works properly with Superfish):

<div id="menu">
    {{=MENU(response.menu, _class='mobile-menu' if is_mobile else 
'sf-menu', mobile=is_mobile)}}
</div>

As you can see, all you have to do is set the _class argument:

{{=MENU(response.menu, _class='your-custom-class')}}

Anthony

Reply via email to