Template::Plugin::Page

Template::Plugin::Page is a plugin to help when paging through sets of results.
Download

Template::Plugin::Page Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Leon Brocard
  • Publisher web site:
  • http://search.cpan.org/~lbrocard/

Template::Plugin::Page Tags


Template::Plugin::Page Description

Template::Plugin::Page is a plugin to help when paging through sets of results. Template::Plugin::Page is a plugin to help when paging through sets of results.SYNOPSIS First page: Last page: First entry on page: Last entry on page: When searching through large amounts of data, it is often the case that a result set is returned that is larger than we want to display on one page. This results in wanting to page through various pages of data. The maths behind this is unfortunately fiddly, hence this module.The main concept is that you pass in the number of total entries, the number of entries per page, and the current page number. You can then call methods to find out how many pages of information there are, and what number the first and last entries on the current page really are.It would be typically used in the following way for an HTML template: Matches < b > - < /b > of < b >< /b > records.< BR > Page < b >< /b > of < b >< /b >< BR > < a href="index.cgi?page=" >Previous< /a > < a href="index.cgi?page=" > Next< /a > ... which would output something like: Matches < b >121 - 130< /b > of < b >134< /b > records.< BR > Page < b >13< /b > of < b >14< /b> < BR > < a href="index.cgi?page=12" >Previous< /a > < a href="index.cgi?page=14" >Next< /a >Note that this module is simply a plugin to the Data::Page module. Requirements: · Perl


Template::Plugin::Page Related Software