NAME
Yukki::Web::View::Role::Navigation - Common page navigation tools for views
VERSION
version 0.991_006
DESCRIPTION
The top and bottom page menus and breadcrumb are typically managed with similar idioms in the various views. This avoid duplicate code in each.
REQUIRED METHODS
The implementor must provide each of the following:
standard_menu
my @menu_items = $view->standard_menu;
Must return a list of hash references. Each hash reference should provide the following keys:
- action
-
This gives the short action name associated with this item.
- label
-
This is the label to give the menu item. If not given the
action
will be uesd with the first letter capitalized. - sort
-
This is a numeric value to use for sorting the menu item. If not given, the default used is 20.
- href
-
This is URI to link to with this menu item. It may contains String::Errf-style interpolations. The variables passed to "page_navigation" will fill in here.
PROVIDED METHODS
page_navigation
$view->page_navigation($ctx->response, $action, \%vars);
This will add navigation items using the menus returned by "standard_menu".
AUTHOR
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Qubling Software LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.