This module allows you to use Views to create simple forward/next pagers. It
provides a new display, Pager block, which will create a block with pager for
items listed in the view.
This pager module is a bit more difficult to wrap your head around than most
pager modules. In return, you get much more flexibility in what you can put
pagers on, and how the pagers should work. The basic concept is this:
* You build a pager to browse between URLs. This means that everything you want
to browse must have its own URL, but that's the only restriction.
* You need to build a view of these URLs. If you're listing nodes, you can build
this by rewriting the NID field to "node/[nid]", but if you want to have
pagers on the node edit pages you could use "node/[nid]/edit" instead.
* You can then add other fields to the view, and use them as the previous/next
links. This could be node titles, image thumbnails, or custom text with static
"previous" or "next" messages. Or anything else you can get into Views.
* Free pager is then available as a block, which you can place in any region on
your Drupal site. If the URL list generated by Views matches the currently
viewed URL the pager will show, otherwise it will be hidden.
The example above uses nodes, but you could of course also use Views to build
lists of user URLs, comment URLs, or whatever other way of generating URLs you
want.
A few notes:
* The tricky part, really, is to have Views creating the list of URLs you want
to be able to flip through. If you find this module cumbersome, start there.
* The fields used for 'previoius', 'current' and 'next' should *not* be linked
in themselves, since Free pager will link them for you.
* There are variables $row_number and $total_rows available in the template file
for Free pager blocks, which can be used to show "3 of 21" or so.
* The module was built to flip through maybe a hundered or two of items, not
many thousands. The module relies on Views rendering the full list of items,
which for 1000 items means a bit more than half a second of work (and quite
a bit of memory consumption). If you want to browse thousands of items,
strongly consider using another module.
There is an example feature provided by this module, showing one way of using
Free pager to flip through content sharing the same taxonomy term.
To use the demo feature:
* Enable the feature, either from the modules list or the features page.
* Go to structure > taxonomy > section and add at least one section.
* Go to structure > blocks and place "Free pager: section browser" in a region
of your choice.
* Create a few nodes of the type "news".
When viewing a node marked with a section, Free pager will provide links to the
older/newer content sharing the same section.
Note that this feature is for educational purpose only. If used on an actual
news site, Views would soon choke on the number of items to render on every
page.
View source
- This module allows you to use Views to create simple forward/next pagers. It
- provides a new display, Pager block, which will create a block with pager for
- items listed in the view.
-
- This pager module is a bit more difficult to wrap your head around than most
- pager modules. In return, you get much more flexibility in what you can put
- pagers on, and how the pagers should work. The basic concept is this:
-
- * You build a pager to browse between URLs. This means that everything you want
- to browse must have its own URL, but that's the only restriction.
- * You need to build a view of these URLs. If you're listing nodes, you can build
- this by rewriting the NID field to "node/[nid]", but if you want to have
- pagers on the node edit pages you could use "node/[nid]/edit" instead.
- * You can then add other fields to the view, and use them as the previous/next
- links. This could be node titles, image thumbnails, or custom text with static
- "previous" or "next" messages. Or anything else you can get into Views.
- * Free pager is then available as a block, which you can place in any region on
- your Drupal site. If the URL list generated by Views matches the currently
- viewed URL the pager will show, otherwise it will be hidden.
-
- The example above uses nodes, but you could of course also use Views to build
- lists of user URLs, comment URLs, or whatever other way of generating URLs you
- want.
-
- A few notes:
- * The tricky part, really, is to have Views creating the list of URLs you want
- to be able to flip through. If you find this module cumbersome, start there.
- * The fields used for 'previoius', 'current' and 'next' should *not* be linked
- in themselves, since Free pager will link them for you.
- * There are variables $row_number and $total_rows available in the template file
- for Free pager blocks, which can be used to show "3 of 21" or so.
- * The module was built to flip through maybe a hundered or two of items, not
- many thousands. The module relies on Views rendering the full list of items,
- which for 1000 items means a bit more than half a second of work (and quite
- a bit of memory consumption). If you want to browse thousands of items,
- strongly consider using another module.
-
- There is an example feature provided by this module, showing one way of using
- Free pager to flip through content sharing the same taxonomy term.
- To use the demo feature:
- * Enable the feature, either from the modules list or the features page.
- * Go to structure > taxonomy > section and add at least one section.
- * Go to structure > blocks and place "Free pager: section browser" in a region
- of your choice.
- * Create a few nodes of the type "news".
-
- When viewing a node marked with a section, Free pager will provide links to the
- older/newer content sharing the same section.
- Note that this feature is for educational purpose only. If used on an actual
- news site, Views would soon choke on the number of items to render on every
- page.