GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PROPHET::WEB::MENU (3)

.ds Aq ’

NAME

Prophet::Web::Menu - Handle the API for menu navigation

CONTENTS

VERSION

version 0.751

ATTRIBUTES

    label [STRING]

Sets or returns the string that the menu item will be displayed as.

    parent [MENU]

Gets or sets the parent Prophet::Web::Menu of this item; this defaults to null. This ensures that the reference is weakened.

    sort_order [NUMBER]

Gets or sets the sort order of the item, as it will be displayed under the parent. This defaults to adding onto the end.

    target [STRING]

Get or set the frame or pseudo-target for this link. something like _blank

    link

Gets or set a Jifty::Web::Link object that represents this menu item. If you’re looking to do complex ajaxy things with menus, this is likely the option you want.

METHODS

    new PARAMHASH

Creates a new Prophet::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 option’s use.

    url

Gets or sets the URL that the menu’s link goes to. If the link provided is not absolute (does not start with a /), then is is treated as relative to it’s parent’s url, and made absolute.

    active [BOOLEAN]

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 paramhash’s label defaults to the KEY, and the sort_order defaults to the pre-existing child’s sort order (if a KEY is being over-written) or the end of the list, if it is a new KEY.

    active_child

Returns the first active child node, or undef is there is none.

    delete KEY

Removes the child with the provided KEY.

    children

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_as_menubar [PARAMHASH]

Render menubar with YUI menu, suitable for an application’s menu. It can support arbitrary levels of submenu.

    as_link

Return this menu item as a Jifty::Web::Link, either the one we were initialized with or a new one made from the /label and /url

If there’s no /url and no /link, renders just the label.

    class [STRING]

Gets or sets the CSS class the link should have in addition to the default classes. This is only used if link isn’t specified.

AUTHORS

o Jesse Vincent <jesse@bestpractical.com>
o Chia-Liang Kao <clkao@bestpractical.com>
o Christine Spang <christine@spang.cc>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2009 by Best Practical Solutions.

This is free software, licensed under:



  The MIT (X11) License



BUGS AND LIMITATIONS

You can make new bug reports, and view existing ones, through the web interface at <https://rt.cpan.org/Public/Dist/Display.html?Name=Prophet>.

CONTRIBUTORS

o Alex Vandiver <alexmv@bestpractical.com>
o Casey West <casey@geeknest.com>
o Cyril Brulebois <kibi@debian.org>
o Florian Ragwitz <rafl@debian.org>
o Ioan Rogers <ioanr@cpan.org>
o Jonas Smedegaard <dr@jones.dk>
o Kevin Falcone <falcone@bestpractical.com>
o Lance Wicks <lw@judocoach.com>
o Nelson Elhage <nelhage@mit.edu>
o Pedro Melo <melo@simplicidade.org>
o Rob Hoelz <rob@hoelz.ro>
o Ruslan Zakirov <ruz@bestpractical.com>
o Shawn M Moore <sartak@bestpractical.com>
o Simon Wistow <simon@thegestalt.org>
o Stephane Alnet <stephane@shimaore.net>
o Unknown user <nobody@localhost>
o Yanick Champoux <yanick@babyl.dyndns.org>
o franck cuny <franck@lumberjaph.net>
o robertkrimen <robertkrimen@gmail.com>
o sunnavy <sunnavy@bestpractical.com>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PROPHET::WEB::MENU (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.