NAME

Mojolicious::Plugin::PageNavigator - Page Navigator plugin for Mojolicious

SYNOPSIS

# Mojolicious::Lite
plugin 'page_navigator'

# Mojolicious
$self->plugin( 'page_navigator' );

DESCRIPTION

Mojolicious::Plugin::PageNavigator generates standard page navigation bar, like

<< 1 2 ... 11 12 13 14 15 ... 85 86 >>

HELPERS

%= page_navigator( $current_page, $total_pages, $opts );

Options

Options is a optional ref hash.

%= page_navigator( $current_page, $total_pages, {
    round => 4,
    outer => 2,
    class => 'number',
    param => 'page' } );
round

Number of pages arround the current page. Default: 4.

outer

Number of outer window pages (first and last pages). Default 2.

class

Class for each page number element. Default: 'number'

param

Name of param for query url. Default: 'page'

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicio.us.

DEVELOPMENT

Repository

https://github.com/silvioq/mojolicious-page-navigator

COPYRIGHT

Copyright (C) 2011, Silvio Quadri

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.