I don't know if I understand your problem, but I do this: adminmenu = [ (T('Admin'), False, '', [ (T('Disk'), False, URL('dynamic', 'diskadmin'), []), (T('Slot'), False, URL('dynamic', 'systemadmin'), []), ]), ]
Which creates a cascaded menu option, then I if auth.has_membership(group_id='admin'): response.menu.append((T('DynAdmin'), False, '', adminmenu)) Which includes the menu, depending if the user is in the admin group. My problem is though, that none of these render in any of the plugin layouts available on web2py.com, you only get the top level menu. I don't know enough html/css to fix this, I'm just trying to build a web form based python app. It does work with the default 'layout.html' from admin. On Tuesday, 10 February 2015 08:33:01 UTC, Yebach wrote: > > > I would like to create a drop down menu in my layout. The data for menu is > read from menu.py > > this is my list for menu > > response.menu_logged = [ > (T('Schedules'),URL('default','index')==URL(),URL('default','index')), > (T('New schedule'),URL('script','edit')==URL(),URL('script','edit', > args='new')), > (T('Settings'), False, None, [ > > (T('Workers'),URL('settings','workers')==URL(),URL('settings','workers')), > > (T('Shifts'),URL('settings','turnusi')==URL(),URL('settings','turnusi')), > (T('Config'),URL('settings','config')== > URL(),URL('settings','config')) ,] > )] > > > Now I would like to put workers, shifts and config in one submenu > (dropdown) called settings (Schedules,new schedule, and config to be > horizontal and then config menus vertical ) > > and in my layout.html > > {{if auth.is_logged_in():}} > {{ for i, page in enumerate(response.menu_logged): }} > <li{{ if response.menu_logged[i][1]: > response.write(XML(' class="active"')) }}><a href="{{ > =response.menu_logged[i][2] }}">{{ =response.menu_logged[i][0] }}</a></li> > > {{ pass }} > <li><a href=" > https://sites.google.com/site/navodilawoshi/" > target="_blank">{{=T('Help')}}</a></li> > any suggestions? > > Is there is a possibility to do it with web2py and not html/css/js? > > thank you > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.