Coding » jcm-pagination

Documentation

.. jcm-pagination:: /base/url
    :page_number: 2
    :total_pages: 4
    :previous_text: older stuff
    :next_text: newer stuff
    :style: x_out_of_y
  • The argument is the base URL of the pagination system. If the page number a link points to is greater than 1, /number/ will be appended to the base URL.
  • :page_number: is the number of the current page. This setting is mandatory.
  • :total_pages: is the total number of pages. This setting is mandatory.
  • :previous_text: and :next_text: allow you to set the text of the "previous" and "next" links, respectively. These are optional, and will be set to "previous" and "next" by default.
  • :style: controls the look of the pagination line. Valid values are default, x_out_of_y, and mcss. This setting is optional, and will default to default.

Examples

Default style

« previous | 1 | 2 | 3 | next »
« previous | 1 | 2 | 3 | next »
« previous | 1 | 2 | 3 | next »

"X out of Y" style

« previous | page 1 out of 3 | next »
« previous | page 2 out of 3 | next »
« previous | page 3 out of 3 | next »

m.css style

page 1 | next »
« previous | page 2 | next »
« previous | page 3