01216: allow navigation buttons (like with trails) using pagelists
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).