/[drupal]/contributions/tricks/pager_without_a_query.php
ViewVC logotype

Contents of /contributions/tricks/pager_without_a_query.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Tue Sep 13 21:20:54 2005 UTC (4 years, 2 months ago) by weitzman
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +15 -0 lines
File MIME type: text/x-php
finally fixing this commit. updated for HEAD
1 <?php
2
3 // this script illustrates how to output a pager when you aren't directly
4 // executing a query. for example, you are calling taxonomy_get_tree()
5 // also useful if you are listing files from a filesystem, for example
6
7 include_once('./includes/bootstrap.inc');
8 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
9
10 $GLOBALS['pager_page_array'][] = 1; //what page you are on
11 $GLOBALS['pager_total'][] = 3; // total number of pages
12 $items_per_page = 50;
13 print theme('pager', NULL, $items_per_page);
14
15 ?>

  ViewVC Help
Powered by ViewVC 1.1.2