PageListExtensions-Talk

Summary: Talk page for PageListExtensions.
Maintainer: MartinFick
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

The beauty of this is that one can use this to make a pagelist which will then list ALL the trails that the current page is on (as distinct from DynamicWikiTrails which only lists the wiki-trail currently being traversed).

First, one makes a pagelist format to reference (recursively) one of the above trail formats, and setting the above 'trail' variable to the currently matching page.

[[#trailtrail]]
(:pagelist trail={=$FullName} fmt={$$trailfmtpage}#{$$trailfmt}:)
[[#trailtrailend]]

When using the #trailtrail format, you give it the 'trailfmt' argument (which selects which 'trail' format to use). (If you don't then you end up with an endless recursion, so beware!)

Then you make a pagelist which lists the pages which link to the current page.

(:pagelist link={$FullName} trailfmt=trail fmt=#trailtrail:)

You would add stuff to this pagelist definition to make sure that the list is limited to pages which are likely to have wikitrails on them, from what you know about the contents of your own wiki. For example, suppose you have three wikitrail pages you're interested in, GroupA/GroupA, GroupA/FooPage and GroupB/BarPage. You don't know if the current page is on any of them, but if it is you want the trail markup to be there. In that case, you would put

(:pagelist group=GroupA,GroupB name=GroupA,FooPage,BarPage link={$FullName} trailfmt=trail fmt=#trailtrail:)

(probably put it in the GroupHeader or GroupFooter to make it easier)

One option might be to "register" dynamic trails. Two simple ways to do this. The first would to add a simple markup to each registered trail index page, i.e DynamicTrail. The second option would be to have a central registry page which is itself a trail index, i.e. Site.DynamicTrails. Both of these solutions could help define the list of trails to search for the current page on. One reason to register trails is to avoid random links to a page to be interpreted as trail indexes pointing to the current page. The second solution would have a major performance enhancement over the first since it would not have to scan all the pages looking for registered trails. Martin Fick October 02, 2006, at 01:30 PM

What comes out is all the trails which the current page is on, automatically, without having to add them by hand. Isn't that nifty?

-- Kathryn Andersen July 28, 2006, at 06:12 PM

Yes, very nifty, I love it! I will have to go back to PITS.00398 and note that you did this! Martin Fick

Er, what exactly does the 'targets' option do? Kathryn Andersen July 28, 2006, at 06:26 PM

Hmm, sorry that the description wasn't clear, I'll see if I can improve it and still keep it simple, maybe you can help? The targets= option takes a page as an argument and the pagelist created is the list of all target pages on that page. So instead of getting only targets that are appropriately formatted for a trail, it gets all page targets! Martin Fick July 28, 2006, at 10:04 PM

Sounds great, but should this still work in 2.2.0-beta65? I don't want to spend hours trying to figure out where in config.php or farmconfig.php I should place it to make it work if it doesn't work at all... Anke January 10, 2008, at 02:16 AM

Talk page for the PageListExtensions recipe (users?).