You are here

README.txt in Pagerer 7

Same filename and directory in other branches
  1. 8 README.txt
Pagerer
=======

Pagerer is a module providing a collection of pager themes to enhance Drupal
and Views standard pagers.

Administrators or site builders can preset multiple pager configurations. Each
'preset' allows a pager to be made up of three 'panes': left, center, and
right. Each pane can contain (or not) a pager theme. In this way there is
plenty of possibilities to combine different elements to satisfy complex
requirements.

Pagerer allows to override Drupal's core pager with any of the preset
configurations. Also, a built-in pager plugin for Views allows to use any of
the preset pagers within any view.

Pagerer uses standard Drupal pager classes to render the pagers, so styling
is preserved.

Module developers can also make direct calls to the themes, thus allowing
even more complex scenarios.

Features:
---------
- multi-pane pager
- Views pager plugin
- control whether to display links to pages, to items, or to item ranges
- direct input of the page to go to through an input widget
- selection of the page to go to through a jQuery UI slider
- selection of the page to go to through a client-side scrolling pager
- links to progressively more distant pages (like +10, + 20, +100, +200)
- adaptive logic links
- specify text to be used to render page separators (like a vertical bar)
  and page breakers (like an ellipsis)
- supports Views' AJAX enabled pager

Themes:
-------
pagerer_standard - alike standard Drupal pager theme
pagerer_progressive - provides links to pages progressively more distant
                      from current
pagerer_adaptive - provides links to pages following an adaptive logic
pagerer_mini - minimal pager, providing direct page entry
               (requires jQuery Update module)
pagerer_scrollpane - provides page navigation through a scrolling pager
                     (requires jQuery Update module)
pagerer_slider - provides page navigation through a jQuery UI slider
                 (requires jQuery Update module)
pagerer - a multi-pane (left, center, and right) pager theme, enabling
          each pane to contain one of the themes above

Requirements:
-------------
- Drupal 7
- the Views pager plugin integrates with Views 3
- jQuery update module (for pagerer_mini, pagerer_scrollpane and pagerer_slider
  themes)
- for Microsoft Internet Explorer browsers, the pagerer_slider and
  pagerer_scrollpane themes require IE 9+

Instructions:
-------------
- Install and enable the module.
- Check the Configuration page to setup.
- Create and configure any number of 'preset' pagers.
- Select a preset to use as a general replacement of Drupal core pager, or
  use a preset as a pager in Views.

Views pager plugin:
-------------------
The pager plugin for Views introduces a new 'Paged output, Pagerer' option in
the list of possible pagers to be used for a view.
It behaves like a 'full pager', with the additional option to select the
Pagerer preset to be used for rendering the pager - so that every view could
use a different preset, but also many views could use the same preset.

Credits:
--------
- The 'pagerer_mini' theme concept and javascript code are to a large
  extent the same of the 'Minimax pager' module for Drupal 6 (i.e. proudly
  copied, thanks mattyoung).
- The animated preloader icon for the jQuery slider widget in timelapse mode
  was generated by http://preloaders.net.
- The use of jQuery queuing for the scrollpane animation was inspired by Ben
  Nadel's blog post http://www.bennadel.com/blog/1864-Experimenting-With-jQuery-s-Queue-And-Dequeue-Methods.htm



Themes
======

----------------------
theme_pagerer_standard
----------------------
This theme is alike standard Drupal pager theme.

Provides links to the 'neigborhood' of current page, plus
first/previous/next/last page. Extended control on the pager is available
through Pagerer's specific variables.

-------------------------
theme_pagerer_progressive
-------------------------
This theme provides links to pages progressively more distant from current.

Besides links to the 'neigborhood' of current page, creates a list of
links which are progressively more distant from current page, displaying
either a page number or an offset from current page.

This is controlled via the 'progr_links' theme variable, which can take
a value either 'absolute' or 'relative'.

Examples:

page 9 out of 212, progr_links 'absolute', display 'pages':
-------------------------------------------------------------------
1 . 4 . 7 8 [9] 10 11 . 14 . 19 . 59 . 109 . 212
-------------------------------------------------------------------

page 9 out of 212, progr_links 'relative', display 'pages':
-------------------------------------------------------------------
1 . -5 . 7 8 [9] 10 11 . +5 . +10 . +50 . +100 . 212
-------------------------------------------------------------------

The 'factors' theme variable controls the quantity of progressive links
generated. Each value in the comma delimited string will be used as a
scale factor for a progressive series of pow(10, n).

Examples: 'factors' => '10' will generate links for page offsets

  ..., -1000, -100, -10, 10, 100, 1000, ....

'factors' => '5,10' will generate links for page offsets

  ..., -1000, -500, -100, -50, -10, -5, 5, 10, 50, 100, 500, 1000, ....

etc.

----------------------
theme_pagerer_adaptive
----------------------
This theme provides links to pages following an adaptive logic.

Besides links to the 'neigborhood' of current page, creates page links
which are adaptively getting closer to a target page, through subsequent
calls to the links themselves. More or less, the principle is the same
as of the binary search in an ordered list.

On a first call, the theme creates links to a list of pages in the
neighborood of first page, plus a link to last page, plus links to 2
pages in the space between first and last page:
- one to the middle,
- one to the middle of the space between the first page and the one above

Example - current page in square brackets:

page 1 out of 252:
-------------------------------------------------------------------
[1] 2 3 4 5 . +62 . +125 . 252
-------------------------------------------------------------------

On subsequent calls, if a link outside of the neighborhood (nicknamed
'adaptive link') is called, then we will assume that the 'target' page
looked for is comprised within the interval between the pages to the
left and to the right of the link invoked. So, the theme will restrict
the range of the pages to be presented in the pager by setting these
pages as the min and max boundaries (plus first and last page, which are
always displayed to 'release' the restriction), and recalculating the
middle and middle-of-the-middle to present the new links.

Example (following on from above):

click on +62, go to page 63 and lock page 5 (represented as -58 from 63)
and 126 (represented as +63 from 63) as new boundaries:
-------------------------------------------------------------------
1 . -58 . -31 . -15 . 61 62 [63] 64 65 . +15 . +31 . +63 . 252
-------------------------------------------------------------------
note how also the space on the left is filled in with links having same
absolute offset as the ones to the right.

and so on, click on -15, go to page 48 and lock page 32 (represented as
-16 from 48) and 61 (represented as +13 from 48):
-------------------------------------------------------------------
1 . -16 . -8 . -4 . 46 47 [48] 49 50 . +4 . +8 . +13 . 252
-------------------------------------------------------------------

Like for the 'pagerer_progressive' theme, links are displayed either as
a page number or as an offset from current page. This is controlled via
the 'progr_links' theme variable, which can take a value either
'absolute' or 'relative'.

------------------
theme_pagerer_mini
------------------
This theme displays current page (or item), and provides a direct page
entry widget to allow navigating to another page.

Examples:

page 9 out of 955, display 'pages':
-----------------------
<< < Page 9 of 955 > >>
-----------------------

page 9 out of 955, total items = 47731, limit = 50, display = 'items':
---------------------------
<< < Item 401 of 47731 > >>
---------------------------

------------------------
theme_pagerer_scrollpane
------------------------
This theme displays a standard pager that is scrollable on the browser
through navigation buttons. Users can get to any page link without having
to send request to the server.

--------------------
theme_pagerer_slider
--------------------
This theme displays a jQuery slider. Page navigation is managed via
javascript.


pagerer_xxxx themes' variables
==============================

Pagerer themes' variables array differs, to some extent, from standard
Drupal core pager theme variables.

- tags: an associative array of tags to be used to render the pager, see
  details in section below (note: this is different from Drupal 'tags'
  variable in the pager theme!)
- element: same as Drupal, an optional integer to distinguish between
  multiple pagers on one page.
- parameters: same as Drupal, an associative array of query string
  parameters to append to the pager links.
- quantity: the number of pages in the list of the 'neighborhood' of the
  current page. For pagerer_slider theme, it serves to approximate the witdh
  of the jQuery slider.
- display_restriction: it allows to restrict showing the pager based on the
  actual number of pages in the result set. It can take the values "default"
  (pager is shown if the result set is made of at least two pages), "one_above"
  (pager is shown also if the result set is made of one page only), "none"
  (pager is shown also if the result set is empty).
- display: can take the values 'pages', 'items', 'item_ranges'. Determines
  whether to display pages, or items, or item ranges.
- label_display: Determines whether and where to render a text "label"
  element (e.g. "Page:"). Options are "none" (not displayed),
  "before_current" (in front of current page), "first" (at the beginning),
  "last" (at the end).
- current_display: Determines how the current page is rendered in the pager.
  Options are "none" (not displayed), "normal" (as a text), "widget" (an active
  input box from where users can enter directly a page to go to), "slider"
  (as a slider), "scrollpane" (as a scrolling pane embedding a full pager).
- total_display: Determines whether and where to render a text element
  indicating the total pages (or items). Options are "none" (not
  displayed), "after_current" (just after current page), "first" (at the
  beginning), "last" (at the end).
- first_link: Determines when to render a link to the first page (e.g.
  "<< first"). Options are "never" (not displayed), "not_on_first"
  (not displayed if current page is the first), "always" (always displayed).
- previous_link: Determines when to render a link to the previous page
  (e.g. "<< previous"). Options are "never" (not displayed), "not_on_first"
  (not displayed if current page is the first), "always" (always displayed).
- next_link: Determines when to render a link to the next page (e.g.
  "next >"). Options are "never" (not displayed), "not_on_last" (not
  displayed if current page is the last), "always" (always displayed).
- last_link: Determines when to render a link to the last page (e.g.
  "last >>"). Options are "never" (not displayed), "not_on_last" (not displayed
  if current page is the last), "always" (always displayed).
- progr_links: pagerer_progressive and pagerer_adaptive themes only. These
  pagers render links to pages far from the current. Select whether to render
  these links as "absolute" page numbers (or items/item ranges) or as
  "relative" offsets from current (e.g. "+10 +100 +1000").
- factors: pagerer_progressive theme only. Comma delimited string of factors
  to use to determine progressive links.
- pager_breaker: Text to render a break in the page sequence.
- pager_separator: Text to fill between contiguous pages. If 'none', no
  separators are rendered.
- range_separator: Text to place between first and last item in a range.
- fl_breakers: (internal) Determine if breakers (...) need to be rendered
  between the first/previous/next/last links and the sequence of page numbers
  that build the pager.

Advanced:
- widget_resize: Determines if the widget width should be calculated
  dynamically based on the width of the string of the last page/item number.
  Set to 'false' to keep a fixed width as set by styling. Default: 'true'.
- slider_action: Determines how the page relocation should be triggered after
  it has been selected through the jQuery slider. Options are: "tickmark"
  (page relocation only occurs after user clicks a tickmark on the slider
  handle), "timelapse" (page relocation occurs after a grace time has elapsed),
  "auto" (the timelapse method is automatically selected based on the accuracy
  of the slider).
- slider_action_timelapse: The grace time (in milliseconds) to wait before the
  page is relocated, in case "timelapse" slider_action method is selected for
  the jQuery slider. "0" will trigger relocation immediately.
- slider_navigation_icons: Determines whether to display +/- navigation icons
  on the sides of the jQuery slider. Options are "yes", "no", "auto" (the icons
  are automatically displayed based on the accuracy of the slider).

pagerer theme variables
=======================

The 'pagerer' theme itself is more a container of individual
pagerer_xxxx themes. The theme to be used in each pane (left, center,
and right) and its variables are either retrieved from a defined preset
through the 'preset' variable, or passed to a {position}_pane variable
of the pagerer theme.

- element: same as Drupal, an optional integer to distinguish between
  multiple pagers on one page.
- parameters: same as Drupal, an associative array of query string parameters
  to append to the pager links.
- preset: (optional) specifies the preset pager configuration, created through
  Pagerer's admin UI, to be used to render the pager. If not specified,
  {position}_pane variables are to be passed. Also, any {position}_pane
  variables will override the preset configuration, if specified along the
  preset variable.
- {position}_pane: where {position} is 'left'|'center'|'right', an associative
  array of
    - theme_name: 'pagerer_standard' | 'pagerer_progressive' |
      'pagerer_scrollpane' | 'pagerer_adaptive' | 'pagerer_mini' |
      'pagerer_slider' | 'none'
    - theme_variables: the $variables associative array for the theme passed
      in 'theme_name'


The 'tags' variable in Pagerer
==============================

The 'tags' variable in pagerer_xxxx themes is an associative array of
tags to be used to render any of the textual elements of the pager. It
differs from Drupal core pager 'tags' variable, which is a simple array.
Any of the textual elements specified can contain a '@number' and/or a
'@total' placeholder that at runtime will be replaced respectively with
the target page and the total number of pages in the pager. If the pager
is set to display 'items' or 'item ranges', the replacement will be with
the corresponding element.

- page: Text to use to render the target page/item/item range. Defaults
  to: '@number'.
- first: Text to use to render the link to the first page (e.g. "<<
  first").
- previous: Text to use to render the link to the previous page
  (e.g. "< previous").
- next: Text to use to render the link to the next page (e.g. "next >").
- last: Text to use to render the link to the last page (e.g. "last >>").
- previous_progr: pagerer_progressive and pagerer_adaptive themes only.
  Text to use to render the link to a previous page outside of the
  neighborhood (e.g. "-100"). Defaults to: '-@number'.
- next_progr: pagerer_progressive and pagerer_adaptive themes only. Text
  to use to render the link to a next page outside of the neighborhood
  (e.g. "+100"). Defaults to: '+@number'.
- total: Text to use to render the total pages/items on the pager. Defaults
  to: 'of @total'.

- page_label: Text to use to render a 'page' label. Defaults to: 'Page'.
- item_label: Text to use to render a 'item' label. Defaults to: 'Item'.
- item_range_label: Text to use to render a 'items range' label. Defaults
  to: 'Items'.

- pageset_empty: Text to use to render the current page in the pager in case
  there are no items in the pageset (e.g. 'No pages to display').

- page_title: Help text used when hovering a page link (e.g. 'Go to page
  @number').
- first_title: Help text used when hovering a first page link (e.g. 'Go to
  first page').
- previous_title: Help text used when hovering a previous page link (e.g.
  'Go to previous page').
- next_title: Help text used when hovering a next page link (e.g. 'Go to
  next page').
- last_title: Help text used when hovering a last page link (e.g. 'Go to
  last page').

- widget_title: Help text used when hovering the direct input widget (e.g.
  'Enter page, then press Return.').
- slider_title: Help text used when hovering the slider (e.g. 'Drag the handle
  to the page required.').
- slider_tickmark_title: Help text appended to the slider help when user is
  expected to click on the tickmark to start page relocation. Defaults to:
  'Then, click on the tickmark.'.


An example for overriding 'tags' at a theme's level
===================================================

Themers can override pager text elements by implementing in the theme's
template.php a hook_preprocess_pagerer_xxxx() function to set the 'tags'
values needed. xxxx should be replaced with the specific pagerer theme
you want to address.

Example:

function mytheme_preprocess_pagerer_mini(&$variables) {
  $variables['tags']['first'] = t('<< foo');
  $variables['tags']['previous'] = t('< bar');
  $variables['tags']['next'] = t('baz >');
  $variables['tags']['last'] = t('qux >>');
}

File

README.txt
View source
  1. Pagerer
  2. =======
  3. Pagerer is a module providing a collection of pager themes to enhance Drupal
  4. and Views standard pagers.
  5. Administrators or site builders can preset multiple pager configurations. Each
  6. 'preset' allows a pager to be made up of three 'panes': left, center, and
  7. right. Each pane can contain (or not) a pager theme. In this way there is
  8. plenty of possibilities to combine different elements to satisfy complex
  9. requirements.
  10. Pagerer allows to override Drupal's core pager with any of the preset
  11. configurations. Also, a built-in pager plugin for Views allows to use any of
  12. the preset pagers within any view.
  13. Pagerer uses standard Drupal pager classes to render the pagers, so styling
  14. is preserved.
  15. Module developers can also make direct calls to the themes, thus allowing
  16. even more complex scenarios.
  17. Features:
  18. ---------
  19. - multi-pane pager
  20. - Views pager plugin
  21. - control whether to display links to pages, to items, or to item ranges
  22. - direct input of the page to go to through an input widget
  23. - selection of the page to go to through a jQuery UI slider
  24. - selection of the page to go to through a client-side scrolling pager
  25. - links to progressively more distant pages (like +10, + 20, +100, +200)
  26. - adaptive logic links
  27. - specify text to be used to render page separators (like a vertical bar)
  28. and page breakers (like an ellipsis)
  29. - supports Views' AJAX enabled pager
  30. Themes:
  31. -------
  32. pagerer_standard - alike standard Drupal pager theme
  33. pagerer_progressive - provides links to pages progressively more distant
  34. from current
  35. pagerer_adaptive - provides links to pages following an adaptive logic
  36. pagerer_mini - minimal pager, providing direct page entry
  37. (requires jQuery Update module)
  38. pagerer_scrollpane - provides page navigation through a scrolling pager
  39. (requires jQuery Update module)
  40. pagerer_slider - provides page navigation through a jQuery UI slider
  41. (requires jQuery Update module)
  42. pagerer - a multi-pane (left, center, and right) pager theme, enabling
  43. each pane to contain one of the themes above
  44. Requirements:
  45. -------------
  46. - Drupal 7
  47. - the Views pager plugin integrates with Views 3
  48. - jQuery update module (for pagerer_mini, pagerer_scrollpane and pagerer_slider
  49. themes)
  50. - for Microsoft Internet Explorer browsers, the pagerer_slider and
  51. pagerer_scrollpane themes require IE 9+
  52. Instructions:
  53. -------------
  54. - Install and enable the module.
  55. - Check the Configuration page to setup.
  56. - Create and configure any number of 'preset' pagers.
  57. - Select a preset to use as a general replacement of Drupal core pager, or
  58. use a preset as a pager in Views.
  59. Views pager plugin:
  60. -------------------
  61. The pager plugin for Views introduces a new 'Paged output, Pagerer' option in
  62. the list of possible pagers to be used for a view.
  63. It behaves like a 'full pager', with the additional option to select the
  64. Pagerer preset to be used for rendering the pager - so that every view could
  65. use a different preset, but also many views could use the same preset.
  66. Credits:
  67. --------
  68. - The 'pagerer_mini' theme concept and javascript code are to a large
  69. extent the same of the 'Minimax pager' module for Drupal 6 (i.e. proudly
  70. copied, thanks mattyoung).
  71. - The animated preloader icon for the jQuery slider widget in timelapse mode
  72. was generated by http://preloaders.net.
  73. - The use of jQuery queuing for the scrollpane animation was inspired by Ben
  74. Nadel's blog post http://www.bennadel.com/blog/1864-Experimenting-With-jQuery-s-Queue-And-Dequeue-Methods.htm
  75. Themes
  76. ======
  77. ----------------------
  78. theme_pagerer_standard
  79. ----------------------
  80. This theme is alike standard Drupal pager theme.
  81. Provides links to the 'neigborhood' of current page, plus
  82. first/previous/next/last page. Extended control on the pager is available
  83. through Pagerer's specific variables.
  84. -------------------------
  85. theme_pagerer_progressive
  86. -------------------------
  87. This theme provides links to pages progressively more distant from current.
  88. Besides links to the 'neigborhood' of current page, creates a list of
  89. links which are progressively more distant from current page, displaying
  90. either a page number or an offset from current page.
  91. This is controlled via the 'progr_links' theme variable, which can take
  92. a value either 'absolute' or 'relative'.
  93. Examples:
  94. page 9 out of 212, progr_links 'absolute', display 'pages':
  95. -------------------------------------------------------------------
  96. 1 . 4 . 7 8 [9] 10 11 . 14 . 19 . 59 . 109 . 212
  97. -------------------------------------------------------------------
  98. page 9 out of 212, progr_links 'relative', display 'pages':
  99. -------------------------------------------------------------------
  100. 1 . -5 . 7 8 [9] 10 11 . +5 . +10 . +50 . +100 . 212
  101. -------------------------------------------------------------------
  102. The 'factors' theme variable controls the quantity of progressive links
  103. generated. Each value in the comma delimited string will be used as a
  104. scale factor for a progressive series of pow(10, n).
  105. Examples: 'factors' => '10' will generate links for page offsets
  106. ..., -1000, -100, -10, 10, 100, 1000, ....
  107. 'factors' => '5,10' will generate links for page offsets
  108. ..., -1000, -500, -100, -50, -10, -5, 5, 10, 50, 100, 500, 1000, ....
  109. etc.
  110. ----------------------
  111. theme_pagerer_adaptive
  112. ----------------------
  113. This theme provides links to pages following an adaptive logic.
  114. Besides links to the 'neigborhood' of current page, creates page links
  115. which are adaptively getting closer to a target page, through subsequent
  116. calls to the links themselves. More or less, the principle is the same
  117. as of the binary search in an ordered list.
  118. On a first call, the theme creates links to a list of pages in the
  119. neighborood of first page, plus a link to last page, plus links to 2
  120. pages in the space between first and last page:
  121. - one to the middle,
  122. - one to the middle of the space between the first page and the one above
  123. Example - current page in square brackets:
  124. page 1 out of 252:
  125. -------------------------------------------------------------------
  126. [1] 2 3 4 5 . +62 . +125 . 252
  127. -------------------------------------------------------------------
  128. On subsequent calls, if a link outside of the neighborhood (nicknamed
  129. 'adaptive link') is called, then we will assume that the 'target' page
  130. looked for is comprised within the interval between the pages to the
  131. left and to the right of the link invoked. So, the theme will restrict
  132. the range of the pages to be presented in the pager by setting these
  133. pages as the min and max boundaries (plus first and last page, which are
  134. always displayed to 'release' the restriction), and recalculating the
  135. middle and middle-of-the-middle to present the new links.
  136. Example (following on from above):
  137. click on +62, go to page 63 and lock page 5 (represented as -58 from 63)
  138. and 126 (represented as +63 from 63) as new boundaries:
  139. -------------------------------------------------------------------
  140. 1 . -58 . -31 . -15 . 61 62 [63] 64 65 . +15 . +31 . +63 . 252
  141. -------------------------------------------------------------------
  142. note how also the space on the left is filled in with links having same
  143. absolute offset as the ones to the right.
  144. and so on, click on -15, go to page 48 and lock page 32 (represented as
  145. -16 from 48) and 61 (represented as +13 from 48):
  146. -------------------------------------------------------------------
  147. 1 . -16 . -8 . -4 . 46 47 [48] 49 50 . +4 . +8 . +13 . 252
  148. -------------------------------------------------------------------
  149. Like for the 'pagerer_progressive' theme, links are displayed either as
  150. a page number or as an offset from current page. This is controlled via
  151. the 'progr_links' theme variable, which can take a value either
  152. 'absolute' or 'relative'.
  153. ------------------
  154. theme_pagerer_mini
  155. ------------------
  156. This theme displays current page (or item), and provides a direct page
  157. entry widget to allow navigating to another page.
  158. Examples:
  159. page 9 out of 955, display 'pages':
  160. -----------------------
  161. << < Page 9 of 955 > >>
  162. -----------------------
  163. page 9 out of 955, total items = 47731, limit = 50, display = 'items':
  164. ---------------------------
  165. << < Item 401 of 47731 > >>
  166. ---------------------------
  167. ------------------------
  168. theme_pagerer_scrollpane
  169. ------------------------
  170. This theme displays a standard pager that is scrollable on the browser
  171. through navigation buttons. Users can get to any page link without having
  172. to send request to the server.
  173. --------------------
  174. theme_pagerer_slider
  175. --------------------
  176. This theme displays a jQuery slider. Page navigation is managed via
  177. javascript.
  178. pagerer_xxxx themes' variables
  179. ==============================
  180. Pagerer themes' variables array differs, to some extent, from standard
  181. Drupal core pager theme variables.
  182. - tags: an associative array of tags to be used to render the pager, see
  183. details in section below (note: this is different from Drupal 'tags'
  184. variable in the pager theme!)
  185. - element: same as Drupal, an optional integer to distinguish between
  186. multiple pagers on one page.
  187. - parameters: same as Drupal, an associative array of query string
  188. parameters to append to the pager links.
  189. - quantity: the number of pages in the list of the 'neighborhood' of the
  190. current page. For pagerer_slider theme, it serves to approximate the witdh
  191. of the jQuery slider.
  192. - display_restriction: it allows to restrict showing the pager based on the
  193. actual number of pages in the result set. It can take the values "default"
  194. (pager is shown if the result set is made of at least two pages), "one_above"
  195. (pager is shown also if the result set is made of one page only), "none"
  196. (pager is shown also if the result set is empty).
  197. - display: can take the values 'pages', 'items', 'item_ranges'. Determines
  198. whether to display pages, or items, or item ranges.
  199. - label_display: Determines whether and where to render a text "label"
  200. element (e.g. "Page:"). Options are "none" (not displayed),
  201. "before_current" (in front of current page), "first" (at the beginning),
  202. "last" (at the end).
  203. - current_display: Determines how the current page is rendered in the pager.
  204. Options are "none" (not displayed), "normal" (as a text), "widget" (an active
  205. input box from where users can enter directly a page to go to), "slider"
  206. (as a slider), "scrollpane" (as a scrolling pane embedding a full pager).
  207. - total_display: Determines whether and where to render a text element
  208. indicating the total pages (or items). Options are "none" (not
  209. displayed), "after_current" (just after current page), "first" (at the
  210. beginning), "last" (at the end).
  211. - first_link: Determines when to render a link to the first page (e.g.
  212. "<< first"). Options are "never" (not displayed), "not_on_first"
  213. (not displayed if current page is the first), "always" (always displayed).
  214. - previous_link: Determines when to render a link to the previous page
  215. (e.g. "<< previous"). Options are "never" (not displayed), "not_on_first"
  216. (not displayed if current page is the first), "always" (always displayed).
  217. - next_link: Determines when to render a link to the next page (e.g.
  218. "next >"). Options are "never" (not displayed), "not_on_last" (not
  219. displayed if current page is the last), "always" (always displayed).
  220. - last_link: Determines when to render a link to the last page (e.g.
  221. "last >>"). Options are "never" (not displayed), "not_on_last" (not displayed
  222. if current page is the last), "always" (always displayed).
  223. - progr_links: pagerer_progressive and pagerer_adaptive themes only. These
  224. pagers render links to pages far from the current. Select whether to render
  225. these links as "absolute" page numbers (or items/item ranges) or as
  226. "relative" offsets from current (e.g. "+10 +100 +1000").
  227. - factors: pagerer_progressive theme only. Comma delimited string of factors
  228. to use to determine progressive links.
  229. - pager_breaker: Text to render a break in the page sequence.
  230. - pager_separator: Text to fill between contiguous pages. If 'none', no
  231. separators are rendered.
  232. - range_separator: Text to place between first and last item in a range.
  233. - fl_breakers: (internal) Determine if breakers (...) need to be rendered
  234. between the first/previous/next/last links and the sequence of page numbers
  235. that build the pager.
  236. Advanced:
  237. - widget_resize: Determines if the widget width should be calculated
  238. dynamically based on the width of the string of the last page/item number.
  239. Set to 'false' to keep a fixed width as set by styling. Default: 'true'.
  240. - slider_action: Determines how the page relocation should be triggered after
  241. it has been selected through the jQuery slider. Options are: "tickmark"
  242. (page relocation only occurs after user clicks a tickmark on the slider
  243. handle), "timelapse" (page relocation occurs after a grace time has elapsed),
  244. "auto" (the timelapse method is automatically selected based on the accuracy
  245. of the slider).
  246. - slider_action_timelapse: The grace time (in milliseconds) to wait before the
  247. page is relocated, in case "timelapse" slider_action method is selected for
  248. the jQuery slider. "0" will trigger relocation immediately.
  249. - slider_navigation_icons: Determines whether to display +/- navigation icons
  250. on the sides of the jQuery slider. Options are "yes", "no", "auto" (the icons
  251. are automatically displayed based on the accuracy of the slider).
  252. pagerer theme variables
  253. =======================
  254. The 'pagerer' theme itself is more a container of individual
  255. pagerer_xxxx themes. The theme to be used in each pane (left, center,
  256. and right) and its variables are either retrieved from a defined preset
  257. through the 'preset' variable, or passed to a {position}_pane variable
  258. of the pagerer theme.
  259. - element: same as Drupal, an optional integer to distinguish between
  260. multiple pagers on one page.
  261. - parameters: same as Drupal, an associative array of query string parameters
  262. to append to the pager links.
  263. - preset: (optional) specifies the preset pager configuration, created through
  264. Pagerer's admin UI, to be used to render the pager. If not specified,
  265. {position}_pane variables are to be passed. Also, any {position}_pane
  266. variables will override the preset configuration, if specified along the
  267. preset variable.
  268. - {position}_pane: where {position} is 'left'|'center'|'right', an associative
  269. array of
  270. - theme_name: 'pagerer_standard' | 'pagerer_progressive' |
  271. 'pagerer_scrollpane' | 'pagerer_adaptive' | 'pagerer_mini' |
  272. 'pagerer_slider' | 'none'
  273. - theme_variables: the $variables associative array for the theme passed
  274. in 'theme_name'
  275. The 'tags' variable in Pagerer
  276. ==============================
  277. The 'tags' variable in pagerer_xxxx themes is an associative array of
  278. tags to be used to render any of the textual elements of the pager. It
  279. differs from Drupal core pager 'tags' variable, which is a simple array.
  280. Any of the textual elements specified can contain a '@number' and/or a
  281. '@total' placeholder that at runtime will be replaced respectively with
  282. the target page and the total number of pages in the pager. If the pager
  283. is set to display 'items' or 'item ranges', the replacement will be with
  284. the corresponding element.
  285. - page: Text to use to render the target page/item/item range. Defaults
  286. to: '@number'.
  287. - first: Text to use to render the link to the first page (e.g. "<<
  288. first").
  289. - previous: Text to use to render the link to the previous page
  290. (e.g. "< previous").
  291. - next: Text to use to render the link to the next page (e.g. "next >").
  292. - last: Text to use to render the link to the last page (e.g. "last >>").
  293. - previous_progr: pagerer_progressive and pagerer_adaptive themes only.
  294. Text to use to render the link to a previous page outside of the
  295. neighborhood (e.g. "-100"). Defaults to: '-@number'.
  296. - next_progr: pagerer_progressive and pagerer_adaptive themes only. Text
  297. to use to render the link to a next page outside of the neighborhood
  298. (e.g. "+100"). Defaults to: '+@number'.
  299. - total: Text to use to render the total pages/items on the pager. Defaults
  300. to: 'of @total'.
  301. - page_label: Text to use to render a 'page' label. Defaults to: 'Page'.
  302. - item_label: Text to use to render a 'item' label. Defaults to: 'Item'.
  303. - item_range_label: Text to use to render a 'items range' label. Defaults
  304. to: 'Items'.
  305. - pageset_empty: Text to use to render the current page in the pager in case
  306. there are no items in the pageset (e.g. 'No pages to display').
  307. - page_title: Help text used when hovering a page link (e.g. 'Go to page
  308. @number').
  309. - first_title: Help text used when hovering a first page link (e.g. 'Go to
  310. first page').
  311. - previous_title: Help text used when hovering a previous page link (e.g.
  312. 'Go to previous page').
  313. - next_title: Help text used when hovering a next page link (e.g. 'Go to
  314. next page').
  315. - last_title: Help text used when hovering a last page link (e.g. 'Go to
  316. last page').
  317. - widget_title: Help text used when hovering the direct input widget (e.g.
  318. 'Enter page, then press Return.').
  319. - slider_title: Help text used when hovering the slider (e.g. 'Drag the handle
  320. to the page required.').
  321. - slider_tickmark_title: Help text appended to the slider help when user is
  322. expected to click on the tickmark to start page relocation. Defaults to:
  323. 'Then, click on the tickmark.'.
  324. An example for overriding 'tags' at a theme's level
  325. ===================================================
  326. Themers can override pager text elements by implementing in the theme's
  327. template.php a hook_preprocess_pagerer_xxxx() function to set the 'tags'
  328. values needed. xxxx should be replaced with the specific pagerer theme
  329. you want to address.
  330. Example:
  331. function mytheme_preprocess_pagerer_mini(&$variables) {
  332. $variables['tags']['first'] = t('<< foo');
  333. $variables['tags']['previous'] = t('< bar');
  334. $variables['tags']['next'] = t('baz >');
  335. $variables['tags']['last'] = t('qux >>');
  336. }