[Pagination] uses 6 settings: current_page
, total_items
, items_per_page
, view
, auto_hide
and first_page_in_url
.
This example shows the default configuration:
return array(
<?php echo View::factory('template/header'); ?> | |
<div class="content main"> | |
<h1>Main</h1> | |
</div> | |
<?php echo View::factory('template/footer'); ?> |
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Controller_Main extends Controller_Base | |
{ | |
public function action_index() | |
{ | |
$this->template->title = "Home"; | |
$this->template->content = View::factory('main/index'); | |
} |
<?php defined('SYSPATH') or die('No direct script access.'); | |
//-- Environment setup -------------------------------------------------------- | |
/** | |
* Set the default time zone. | |
* | |
* @see http://kohanaframework.org/guide/using.configuration | |
* @see http://php.net/timezones | |
*/ |
<?php echo View::factory('template/header'); ?> | |
<div class="content error"> | |
<h1>File Not Found - 404</h1> | |
</div> | |
<?php echo View::factory('template/footer'); ?> |
<?php echo View::factory('template/header'); ?> | |
<div class="content error"> | |
<h1>Application Error - 500</h1> | |
</div> | |
<?php echo View::factory('template/footer'); ?> |
<div id="header"> | |
<h1><a href="/">Header</a></h1> | |
</div> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title><?php echo $title ?></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<?php foreach ($styles as $file) echo HTML::style($file), "\n" ?> | |
<?php foreach ($scripts as $file) echo HTML::script($file), "\n" ?> | |
</head> | |
<body> | |
<div id="page"> |
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Controller_Errors extends Controller_Base | |
{ | |
public function action_404() | |
{ | |
$this->template->title = "File Not Found - 404"; | |
$this->template->content = View::factory('errors/404'); | |
} | |
public function action_500() |