Elgg  Version 1.9
Namespaces | Variables
pagination.php File Reference

Go to the source code of this file.

Namespaces

 Elgg
 Save menu items.
 

Variables

if(elgg_in_context('widget')) $offset = abs((int) elgg_extract('offset', $vars, 0))
 
if(!$limit=(int) elgg_extract('limit', $vars, 10)) $count = (int) elgg_extract('count', $vars, 0)
 
 $offset_key = elgg_extract('offset_key', $vars, 'offset')
 
if(isset($vars['base_url'])&&$vars['base_url']) else if(isset($vars['baseurl'])&&$vars['baseurl']) elseif(elgg_is_xhr()&&!empty($_SERVER['HTTP_REFERER'])) else
 
 $num_pages = elgg_extract('num_pages', $vars, 10)
 
 $delta = ceil($num_pages / 2)
 
if($count<=$limit &&$offset==0) $total_pages = ceil($count / $limit)
 
 $current_page = ceil($offset / $limit) + 1
 
 $pages = new stdClass()
 
$pages prev
 
$pages next
 
$pages items = array()
 
if($current_page > 1) $pages items [] = $current_page
 
 if ($current_page< $total_pages)
 

Variable Documentation

if (!$limit=(int) elgg_extract('limit', $vars, 10)) $count = (int) elgg_extract('count', $vars, 0)

Definition at line 26 of file pagination.php.

$current_page = ceil($offset / $limit) + 1

Definition at line 49 of file pagination.php.

$delta = ceil($num_pages / 2)

Definition at line 41 of file pagination.php.

$num_pages = elgg_extract('num_pages', $vars, 10)

Definition at line 40 of file pagination.php.

if (elgg_in_context('widget')) $offset = abs((int) elgg_extract('offset', $vars, 0))
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 20 of file pagination.php.

$offset_key = elgg_extract('offset_key', $vars, 'offset')

Definition at line 27 of file pagination.php.

$pages = new stdClass()

Definition at line 51 of file pagination.php.

if ($count<=$limit &&$offset==0) $total_pages = ceil($count / $limit)

Definition at line 48 of file pagination.php.

foreach ($pages->items as $page) if ($pages->next['href']) else
Initial value:
{
current_page_url()
Returns the current page&#39;s complete URL.
Definition: input.php:106
$base_url
Definition: list.php:24

Definition at line 36 of file pagination.php.

if($current_page< $total_pages)

Definition at line 87 of file pagination.php.

$pages items = array()

Definition at line 62 of file pagination.php.

if ($current_page > 1) $pages items[] = $current_page

Definition at line 83 of file pagination.php.

$pages next
Initial value:
= array(
'text' => elgg_echo('next'),
'href' => '',
'is_trusted' => true,
)
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21

Definition at line 57 of file pagination.php.

$pages prev
Initial value:
= array(
'text' => elgg_echo('previous'),
'href' => '',
'is_trusted' => true,
)
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21

Definition at line 52 of file pagination.php.