01216: allow navigation buttons (like with trails) using pagelists

Summary: allow navigation buttons (like with trails) using pagelists
Created: 2010-08-05 16:21
Status: Closed - Cookbook:DynamicTrails
Category: CoreCandidate
Assigned:
Priority: 2
Version: 2.2
OS: n/a

Description: Trails offers the nice capability of navigating to "next" and "previous" pages using the <<|trailpage|>> markup. These navigation buttons are great, but they are currently limited to the static WikiTrails. It would be nice to have the capabilities of dynamic pagelists but on a navigation basis rather than just a listing basis...

For example, you create a group with pages each representing an item you are going to sell. Your main page gives a pagelist of all the for-sale items. But when someone wants to look at the details one after another either (a) they have to go back to the main page each time to get to the next page or (b) you have to try to keep a trail page updated whenever there is an addition/deletion to the pages in the group.

The attached patch to scripts/trails.php gives the capability (although I would want others who know the whole pmwiki system better to look it over & test it & give input on the markup and what gets placed in the middle link and etc. -- this is perhaps more a "proof of concept" than a polished finished product.)

The markup looks like this:

<<|pagelist group=Test name=P1,Page3,Page7 order=$Name title="some title"|>>

The arguments to pagelist are identical to elsewhere except (1) a title=X argument is added to go into the middle of the navigation buttons and (2) if you specify fmt=X it needs to result in a trail-like list syntax (#simple is default).


Doesn't the Cookbook:DynamicTrails recipe already provide the feature? --Dfaure August 06, 2010, at 11:55 PM

Yep, sure enough. I must have typo'd when I searched... :-( I'll go ahead and close this.