Template::Magic::Pager

Template::Magic::Pager is a HTML pager for Template::Magic.
Download

Template::Magic::Pager Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Domizio Demichelis
  • Publisher web site:
  • http://search.cpan.org/~domizio/CGI-Application-Plus-1.21/lib/CGI/Application/CheckRM.pm

Template::Magic::Pager Tags


Template::Magic::Pager Description

Template::Magic::Pager is a HTML pager for Template::Magic. Template::Magic::Pager is a HTML pager for Template::Magic.SYNOPSIS use Template::Magic::Pager ; # 1st way (useful when you have big number of results) $pager = Template::Magic::Pager->new ( total_results => $results # integer , page_rows => $rows # ARRAY ref , page_number => $page_number # integer , rows_per_page => $rows_per_page # integer , pages_per_index => $pages_per_index # integer ) ; # 2nd way (useful when you have all the result in an ARRAY) # total_results is an ARRAY ref and page_rows is ommitted $pager = Template::Magic::Pager->new ( total_results => $results # ARRAY ref , page_number => $page_number # integer , rows_per_page => $rows_per_page # integer , pages_per_index => $pages_per_index # integer ) ;and inside the 'pager' block in your template file you will have availables a complete set of "Labels and Blocks".METHODSnew( arguments )This method returns the new object reference ONLY if there are results to display (see total_results below). It accepts the following arguments:total_results Mandatory argument. It may be an integer value of the total number of results you want to split into pages (not to be confused with the results of one page), or it may be a reference to the whole array of results; in this case you should omit the page_rows argument. (see SYNOPSIS to see the two ways to use the new() method)If the passed value is not true (0 or undef), then the new() method will return the undef value instead of the object, thus allowing you to define a NOT_pager block that will be printed when no result has been found.page_rows Mandatory argument only if the total_result argument is an integer. It expect a reference to an ARRAY containing the slice of results of the current page (or a reference to a sub returning the reference to the ARRAY).page_number It expects an integer value representing the page to display. Default is 1 (i.e. if no value is passed then the page number 1 will be displayed).rows_per_page Optional argument. This is the number of results that will be displayed for each page. Default 10.pages_per_index Optional argument. This is the number of pages (or items) that will build the index bar. Default 10. Requirements: · Perl version >= 5.6.1 · Template::Magic >= 1.2 · OOTools >= 1.71


Template::Magic::Pager Related Software