Login   Register  
PHP Classes
elePHPant
Icontem

File: Example

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of alismith  >  Pagination link class  >  Example  >  Download  
File: Example
Role: Example script
Content type: text/plain
Description: pagination class usage example
Class: Pagination link class
Generate pagination links for long listings
Author: By
Last change: updated
Date: 1 year ago
Size: 635 bytes
 

Contents

Class file image Download
<?php

include('pagination.php');

/*
 * pagination class
 * @records count
 * @items per page
 * @pagination button per page
 * @current page number (active button)
 * @options for config pagination button style and set page address
 **/

$pagination = new pagination(100,10,10,4,array(
            
'template' => '<a href="{url}" class="btn btn-inverse" title="{info}">{number}</a>',
'info' => 'page {currentPage} of {totalPages}',
'currentItemTemplate' => '<a href="{url}" class="btn btn-inverse active" title="{info}">{number}</a>',
/*'url' => '',*/
'separator' => "\n"
            
));

echo 
$pagination->displayLink();

?>