CatalystX::NavigationMenuItem
my $mi = CatalystX::NavigationMenuItem->new( ... ); my $entry = $mi->nav_entry($c); my $link = $mi->get_link($c);
CatalystX::NavigationMenuItem represents a menu item in a L(CatalystX::NavigationMenu). This object does all the work of determining if the menu item can be displayed, what link to use and if there are sub menus.
Returns true if this menu item or any of its children contain the given path.
Returns a hash reference that contains the navigation entry for this item. If there is no link associated with item it will return an undef value. If $with_subs is true then the sub navigation to this item is also include in the hash with a key of: subnav. The other keys are:
The label to use for the actual link. The text to show between a tags.
An optional title of the link. To be used as the title attribute of the a tag.
The actual link. This contains the actual URI string, not an object.
True if the given entry is currently active (part of the path to the currently viewed page).
Add the given item to the sub tree for this item. If no subtree exists create one.
Using the given Catalyst object determine if this link should be displayed or not. It will use the Catalyst object to fill in any missing values it needs to complete an action link, it will also use the object to determine any conditions that require it.
Catalyst
CatalystX::NavigationMenu
Derek Wueppelmann <derek@roaringpenguin.com>
Copyright (c) 2011 Roaring Penguin Software, Inc.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Plugin::Navigation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Navigation
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Navigation
For more information on module installation, please visit the detailed CPAN module installation guide.