It works, but I went for a different solution : I built a function in my
view that builds the menu I want.
For the record, my function looks like this :
{{
def profile_menu(list_of_tuples):
return DIV(*[A(i[0], _href=i[1], _class="btn btn-nav btn-36 btn-grey" if
request.url != i[1] else "btn btn-nav btn-36 btn-pink") \
for i in list_of_tuples],
_class="l-nav-profile")
}}
On Sunday, July 27, 2014 6:10:11 PM UTC+2, Massimo Di Pierro wrote:
>
> You can make your menu to contain links:
>
> response.menu =
> [('name',None,A('name',_href=URL('index'),_class="btn")),....]
>
>
> On Thursday, 24 July 2014 12:26:51 UTC-5, Louis Amon wrote:
>>
>> I'm trying to build a MENU styled with Boostrap.
>>
>> I'd like my <li> items to have the class "btn".
>>
>> How can I do that in web2py ??
>>
>>
>> As far as I know, li_class is only applied on submenus, but not on
>> primary menu items.
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.