Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

BreakPageList

Summary: display a pagelist in smaller chunks and display navigation links to all
Version: 2007-05-16
Prerequisites: ?
Status: new
Maintainer: HansB
Categories: Searching

Questions answered by this recipe

How to break a pagelist dispaly into smaller chunks.

Description

Use BreakPageList to break a long pagelist display into several subpages, and display links to all subpages as a series of page numbers.

Download breakpagelist.phpΔ, copy to cookbook folder and install in config.php with

include_once("$FarmD/cookbook/breakpagelist.php");

Usage:

  • Create a first pagelist for determining max page count (optionally displaying the count):
    (:pagelist .... fmt=maxcount :)
  • Create a second pagelist as the pagelist with the real output format:
    (:pagelist ..... count={$BPLRange} :)
  • Create subpage links with markup (:breakpagelist:)

Note the order of pagelists!
Both pagelists should have same listing parameters, and differ only in the fmt= and in the count= parameters

You can set in a local config file $BPLEntriesPerPage for the number of entries the pageglist shall display per page.

Example:

Total Pages: (:pagelist group=Cookbook list=normal fmt=maxcount :)

(:breakpagelist:)

(:pagelist group=Cookbook list=normal fmt=#titles count={$BPLRange} :)

Notes

count={$BPLRange} gives a range for the pagelist in form of count=from..to.
For the highest range shown {$BPLRange} will not show the actual last (highest) page entry number, but a number equal or higher than this.

Release Notes

  • 2007-05-16: initial release

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

Comments

See Also

Contributors

Edit - History - Print - Recent Changes - Search
Page last modified on May 18, 2007, at 02:55 AM