Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

colinbm/kohana-pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Kohana Pagination

There are many like it, but this one is mine.

The default view uses the Bootstrap pagination markup.

Usage

Controller

<?php

# Make sure you have <page> defined in your route (or a different parameter - see Pagination::$route_page_param

...

public function action_user() {
	$users = ORM::factory('users');
	# Add where clause, etc, here if filtering
	$pagination = new Pagination($users, $this->request->param('page'), 'admin_user');
	$this->template->content->pagination = $pagination;
}

View

<?php echo $pagination->render(); ?>

<?php foreach ($pagination->result() as $user): ?>
	Username: <?php echo $user->username; ?><br />
	Email: <?php echo $user->email; ?><br />
	<br />
<?php endforeach; ?>

<?php echo $pagination->render(); ?>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages