2017 © Pedro Peláez
 

library pager

Renders HTML pagers. Nothing else.

image

mindplay/pager

Renders HTML pagers. Nothing else.

  • Tuesday, September 30, 2014
  • by mindplay.dk
  • Repository
  • 1 Watchers
  • 2 Stars
  • 2,361 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 7 % Grown

The README.md

mindplay/pager

Build Status, (*1)

How many times have I written pagers? Too many., (*2)

So here's a distilled abstract base-class for pagers, along with the two kinds of pagers I have used most frequently: one for <button> tags, and one for <a> tags., (*3)

Personally I like <button> pagers, which typically require no JavaScript - it can produce markup along the lines of this:, (*4)

<button disabled="disabled">&laquo;</button>&nbsp;
<button name="page" value="1" disabled="disabled" class="is-active">1</button>&nbsp;
<button name="page" value="2">2</button>&nbsp;
<button name="page" value="3">3</button>&nbsp;
<button name="page" value="4">4</button>&nbsp;
<button name="page" value="5">5</button>&nbsp;&#x22EF;&nbsp;
<button name="page" value="10">10</button>&nbsp;
<button name="page" value="2">&raquo;</button>

Your average everyday link pager produces markup like this:, (*5)

<a href="#">&laquo;</a>&nbsp;
<a href="result.php?page=1" class="is-active">1</a>&nbsp;
<a href="result.php?page=2">2</a>&nbsp;
<a href="result.php?page=3">3</a>&nbsp;
<a href="result.php?page=2">&raquo;</a>

The markup in both cases is pretty minimal - I didn't want a bunch of configurable CSS class-names, a container div, or boatloads of other options, but deriving your own custom pager-classes should be pretty painless. (No guarantees, I said it should be.), (*6)

The Versions

30/09 2014

dev-master

9999999-dev

Renders HTML pagers. Nothing else.

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.0

 

30/09 2014

1.1.0

1.1.0.0

Renders HTML pagers. Nothing else.

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.0

 

26/09 2014

1.0.2

1.0.2.0

Renders HTML pagers. Nothing else.

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.0

 

25/09 2014

1.0.1

1.0.1.0

Renders HTML pagers. Nothing else.

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.0

 

25/09 2014

1.0.0

1.0.0.0

Renders HTML pagers. Nothing else.

  Sources   Download

LGPL-3.0+

The Requires

  • php >=5.3.0