Package web2py :: Package gluon :: Module html :: Class MENU
[hide private]
[frames] | no frames]

Class MENU

source code

  object --+        
           |        
XmlComponent --+    
               |    
             DIV --+
                   |
                  MENU


Used to build menus

Optional arguments
  _class: defaults to 'web2py-menu web2py-menu-vertical'
  ul_class: defaults to 'web2py-menu-vertical'
  li_class: defaults to 'web2py-menu-expand'

Example:
    menu = MENU([['name', False, URL(...), [submenu]], ...])
    {{=menu}}



Instance Methods [hide private]
 
__init__(self, data, **args)
:param *components: any components that should be nested in this element :param **attributes: any attributes you want to give to this element
source code
 
serialize(self, data, level=0) source code
 
xml(self)
generates the xml for this component.
source code

Inherited from DIV: __delitem__, __getitem__, __len__, __nonzero__, __setitem__, __str__, append, element, elements, flatten, insert, sibling, siblings, update

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
  tag = 'ul'

Inherited from DIV: regex_attr, regex_class, regex_id, regex_tag

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, data, **args)
(Constructor)

source code 

:param *components: any components that should be nested in this element :param **attributes: any attributes you want to give to this element

:raises SyntaxError: when a stand alone tag receives components
Overrides: DIV.__init__
(inherited documentation)

xml(self)

source code 
generates the xml for this component.
Overrides: DIV.xml
(inherited documentation)