[web2py] Re: response.menu args

2013-04-17 Thread Robin Manoli
The second argument here tells whether this menu item is active or not. 
Setting this to true adds the class="web2py-menu-active" to the li of the 
menu-item.

Unfortunately though, this class is not implemented by default in web2py, 
and nor is the argument set to (request.function=='index') which would be 
more pedagogic. However, since the default menu is made in twitter 
bootstrap, it would be neater to use bootstrap's own active class, which is 
simply named "active".

How can I change the current line of code to set the active class to 
"active" instead of "web2py-menu-active"?
The current menu code in layout.html is:
{{=MENU(response.menu, _class='mobile-menu nav' if is_mobile else 
'nav',mobile=is_mobile,li_class='dropdown',ul_class='dropdown-menu')}}


Den onsdagen den 19:e september 2012 kl. 17:55:09 UTC+2 skrev lyn2py:
>
> Hi guys,
>
> This is a typical code
> response.menu = [
> (T('Home'), False, URL('default','index'), [])
> ]
>
> I would like to ask, what does the 2nd arg, "False" actually refer to?
> I tried changing it to True but it didn't seem to have any effect on the 
> menu.
> I tried a quick search on the manual and the groups, but didn't manage to 
> find out. 
>
> Thanks for the quick help!
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: response.menu args

2012-09-19 Thread lyn2py
Thanks Paolo!

On Thursday, September 20, 2012 1:40:16 AM UTC+8, Paolo Caruccio wrote:
>
> see https://groups.google.com/d/msg/web2py/Jc2qOVJ-Zws/yLzKdWb-y3cJ
>
>
> Il giorno mercoledì 19 settembre 2012 17:55:09 UTC+2, lyn2py ha scritto:
>>
>> Hi guys,
>>
>> This is a typical code
>> response.menu = [
>> (T('Home'), False, URL('default','index'), [])
>> ]
>>
>> I would like to ask, what does the 2nd arg, "False" actually refer to?
>> I tried changing it to True but it didn't seem to have any effect on the 
>> menu.
>> I tried a quick search on the manual and the groups, but didn't manage to 
>> find out. 
>>
>> Thanks for the quick help!
>>
>

-- 





[web2py] Re: response.menu args

2012-09-19 Thread Paolo Caruccio
see https://groups.google.com/d/msg/web2py/Jc2qOVJ-Zws/yLzKdWb-y3cJ


Il giorno mercoledì 19 settembre 2012 17:55:09 UTC+2, lyn2py ha scritto:
>
> Hi guys,
>
> This is a typical code
> response.menu = [
> (T('Home'), False, URL('default','index'), [])
> ]
>
> I would like to ask, what does the 2nd arg, "False" actually refer to?
> I tried changing it to True but it didn't seem to have any effect on the 
> menu.
> I tried a quick search on the manual and the groups, but didn't manage to 
> find out. 
>
> Thanks for the quick help!
>

--