Yeah, you'd have to apply your own CSS to get it to look right in that case. Instead, why don't you use the first method:
('Item 3', False, None, [('Subitem1', False, URL(...)), ('Subitem2', False,URL (...))]) That will look and behave properly, but clicking the "Item 3" link won't do anything. Anthony On Tuesday, April 30, 2013 1:10:18 PM UTC-4, LJ wrote: > > i don't want the item to be a link at all, it should just expand the > submenu. i tried using CAT('Item 3') as you suggested but that changes the > appearance. i have attached the screenshot by making the changes in the > Welcome app. Now the item "This app" doesn't have the indication of a > submenu and is not highlighted when my mouse is on it. > > > > On Tuesday, April 30, 2013 2:49:47 AM UTC+5:30, Anthony wrote: >> >> If you do: >> >> ('Item 3', False, None, [('Subitem1', False, URL(...)), ('Subitem2', >> False, URL(...))]) >> >> "Item 3" should be a clickable link, but clicking it won't do anything >> (it's href will b "#", and it will have an "onclick" handler that does >> nothing in response to a click). If you don't want it to be a link at all, >> you can do: >> >> ('', False, CAT('Item 3'), [('Subitem1', False, URL(...)), ('Subitem2', >> False, URL(...))]) >> >> If the third element of the tuple is a web2py HTML helper, it will not >> construct a link but instead just include the helper (assuming you have >> included your own link within the helper if desired). >> >> Anthony >> >> On Monday, April 29, 2013 3:35:24 PM UTC-4, LJ wrote: >>> >>> Hi >>> >>> How can i create a menu item without a URL? >>> >>> Basically what i want is that if a menu item expands into a submenu, >>> then that menu item should not be clickable, only the sub menu items should >>> have URLs. If i write it as None, it still gets converted to a default URL >>> (default/index) >>> >>> For eg. "Menu" on nav-bar expands to 4 items. Item 3 further expands to >>> two items in its submenu. >>> *Menu* >>> *Item 1* >>> *Item 2* >>> Item 3-> *Subitem1* >>> *Item 4* *Subitem2* >>> >>> Item 1,2 and 4 should have URLs since they don't expand further. But >>> since Item3 has a submenu, i should be able to click on Subitem1 or >>> Subitem2 but not Item3. >>> >> -- --- 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.