I understood what was the matter, it was styling! But, how to add the third field:
if auth.is_logged_in(): rows = db(db.map).select(db.map.menu1, db.map.menu2, db.map.mnm_name, orderby=db.map.num, distinct=True) from collections import defaultdict d = defaultdict(list) for row in rows: d[row.menu1].append(row.menu2) response.menu = [('Shema', True, URL('default'),[ [key, False, None, [[sub, False, None, [[sub, False, 'link']]] for sub in sorted(d[key])]] for key in sorted(d)]) ] in layout.html add style and js: <style> .dropdown-submenu{position:relative;} .dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;} .dropdown-submenu:hover>.dropdown-menu{display:block;} .dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;} .dropdown-submenu:hover>a:after{border-left-color:#ffffff;} .dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;} </style> <script src="{{=URL('static','js/bootstrap-submenu.min.js')}}"></script> How to add db.map.mnm_name to row.menu2, somthing like that - d[row.menu1].append(row.menu2).append(db.map.mnm_name) (i know - that's is not working) ????? -- 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.