Manual Reference Pages - JIFTY::WEB::MENU (3)
Jifty::Web::Menu - Handle the API for menu navigation
Creates a new Jifty::Web::Menu object. Possible keys in the
PARAMHASH are label, parent, sort_order, url, and
active. See the subroutines with the respective name below for
each options use.
Sets or returns the string that the menu item will be displayed as.
Gets or sets the parent Jifty::Web::Menu of this item; this defaults
to null. This ensures that the reference is weakened.
Sets the content of this menu item to a raw blob of HTML. When
asked or output, rather than constructing a link, Jifty will return
this raw content. No escaping is done.
Gets or sets the sort order of the item, as it will be displayed under
the parent. This defaults to adding onto the end.
Gets or set a Jifty::Web::Form::Link object that represents this
menu item. If youre looking to do complex ajaxy things with menus,
this is likely the option you want.
Get or set the frame or pseudo-target for this link. something like _blank
Gets or sets the CSS class the link should have in addition to the default
classes. This is only used if link isnt specified.
Gets or sets whether children are rendered inline as a menu group instead
of a true submenu. Only used when rendering with YUI for now.
Defaults to false.
Note that YUI doesnt support rendering nested menu groups, so having direct
parent/children render_children_inline is likely not going to do what you
want or expect.
Gets or sets the URL that the menus link goes to. If the link
provided is not absolute (does not start with a /), then is is
treated as relative to its parents url, and made absolute.
Gets or sets if the menu item is marked as active. Setting this
cascades to all of the parents of the menu item.
child KEY [, PARAMHASH]
If only a KEY is provided, returns the child with that KEY.
Otherwise, creates or overwrites the child with that key, passing the
PARAMHASH to new in Jifty::Web::Menu. Additionally, the paramhashs
label defaults to the KEY, and the sort_order defaults to the
pre-existing childs sort order (if a KEY is being over-written) or
the end of the list, if it is a new KEY.
If the paramhash contains a key called menu, that will be used instead
of creating a new Jifty::Web::Menu.
Returns the first active child node, or undef is there is none.
Removes the child with the provided KEY.
Returns the children of this menu item in sorted order; as an array in
array context, or as an array reference in scalar context.
Render this menu with HTML markup as multiple dropdowns, suitable for
an applications menu
Any arguments are passed to render_as_hierarchical_menu_item.
Render this menu with html markup as an inline dropdown menu.
Render an <li> for this item. suitable for use in a regular or contextual
menu. Currently renders one level of submenu, if it exists, using
Any arguments are passed to render_submenu.
Renders a <ul> for the children (but not descendants) of this menu object,
suitable for use as part of a regular or contextual menu. Called by
render_as_hierarchical_menu_item. You probably dont need to use this
on its own.
If passed deep_active = 1>, then it renders active descendants recursively
all the way down.
Render this menu with html markup as old classical mason menu.
Currently renders one level of submenu, if it exists.
Render menu with YUI menu. It can support arbitrary levels of submenus.
Valid options for the paramhash are as follows:
The HTML element ID to use for the menu
A boolean indicating whether to show the menu after rendering the HTML.
Defaults to true. If you dont set this to true, you should use the
to a function which shows the menu.
the menu. See <http://developer.yahoo.com/yui/menu/#configreference> for
a list of the options available.
variable menu is available and represents the current YUI Menu object.
Render menubar with YUI menu, suitable for an applications menu.
It can support arbitrary levels of submenu.
Return this menu item as a Jifty::Web::Form::Link, either the one
we were initialized with or a new one made from the label and url
If theres no url and no link, renders just the label.
|perl v5.20.3 ||JIFTY::WEB::MENU (3) ||2011-02-07 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.