Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Template::Plugin::Pagination
a plugin to help paginate pages of results

Template::Plugin::Pagination - a plugin to help paginate pages of results


NAME

Template::Plugin::Pagination - a plugin to help paginate pages of results


SYNOPSIS


  [% USE page = Pagination(items, current_page, entries_per_page) %]

        [% FOREACH item IN page.page_data; ...; DONE %]

  First page: [% page.first_page %]

  Prev page: [% page.previous_page %]

  Next page: [% page.next_page %]

  Last page: [% page.last_page %]


DESCRIPTION

This plugin helps you construct pages that include subsets of data from a list, such as search results which you'll paginated in groups of 10.

It's based heavily on Template::Plugin::Page, which you should see for a detailed example of to use this. (That module is a thin wrapper around Data::Page, whereas this one is a wrapper around Data::Paginated, which is Data::Page + Data::Pageset + some extras).


METHODS

new

This is the constructor. It has one mandatory arguments: the list of items we're working with. You can also pass the page number you're currently working with which will otherwise default to 1) and the number of entries there will be on each page (which defaults to 10).


Pageset Methods

You now have available all the methods from Data::Page, Data::Pageset
and Data::Paginated, including:

page_data
first_page
last_page
next_page
previous_page

See their manual pages for details.


AUTHOR

Tony Bowden, <cpan@tmtm.com>


BUGS and QUERIES

Please direct all correspondence regarding this module to: bug-Template-Plugin-Pagination@rt.cpan.org


SEE ALSO

the Template::Plugin::Page manpage, the Data::Page manpage, the Data::Pageset manpage, the Data::Paginated manpage


COPYRIGHT

Copyright (C) 2004-2006 Tony Bowden. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy