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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.