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

Class MENU

source code

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


Used to build menus

Args:
    _class: defaults to 'web2py-menu web2py-menu-vertical'
    ul_class: defaults to 'web2py-menu-vertical'
    li_class: defaults to 'web2py-menu-expand'
    li_first: defaults to 'web2py-menu-first'
    li_last: defaults to 'web2py-menu-last'

Use like::

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

Instance Methods [hide private]
 
__init__(self, data, **args)
Args: components: any components that should be nested in this element attributes: any attributes you want to give to this element
source code
 
serialize(self, data, level=0) source code
 
serialize_mobile(self, data, select=None, prefix='') 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 XmlComponent: __add__, __mul__, add_class, remove_class

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

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 

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

Raises:
    SyntaxError: when a stand alone tag receives components

Overrides: object.__init__
(inherited documentation)

xml(self)

source code 

generates the xml for this component.

Overrides: XmlComponent.xml