You are here

function Pagination::getPageVar in Pagination (Node) 6

Same name and namespace in other branches
  1. 7 includes/Pagination.inc \Pagination::getPageVar()

@desc Get value of $_GET['page']

Return value

int value of $_GET['page'] @public

2 calls to Pagination::getPageVar()
Pagination::getPager in ./pagination.module
@desc Get a themed pager (Drupal default)
Pagination::getToc in ./pagination.module
@desc Get a themed Table of Contents

File

./pagination.module, line 615
pagination.module @desc Allow for arbitrary nodes to be paginated. administrators can set which nodes they wish to paginate, and the length of content required to split a node into pages. Alternatively, content creators can set manual break points…

Class

Pagination
@desc Handles all the pagination logic

Code

function getPageVar() {
  $page = isset($_GET['page']) ? $_GET['page'] : 0;
  if (variable_get('pagination_onebased', 1) == 1) {
    $page = $page > 0 ? --$page : $page;
  }
  return $page;
}