[Pmwiki-users] Help with DTIndex

Patrick R. Michaud pmichaud
Wed Oct 20 07:28:28 CDT 2004


On Wed, Oct 20, 2004 at 09:32:36AM +0200, KRAIT philippe wrote:
> > From: "Patrick R. Michaud" <pmichaud at pobox.com>
> > Take a look at 
> > http://www.pmwiki.org/pmwiki2/pmwiki.php/Cookbook/DictIndex
> 
> Fantastic, this is great and it works exactly the way I want it.

Excellent.

> There is only one small thing that the other script did, which is to 
> remove some pages from the list (like headers, footers, etc...). 

This is a frequently requested feature, so I've just added a 
"list=normal" parameter to [:searchlist:] and [:pagelist:]
that allows an author to request only "normal" pages in the output
(i.e., excluding things such as RecentChanges, AllRecentChanges,
RecentUploads, GroupHeader, etc.).  If no list= parameter is
specified, the default is to display all pages.

Thus, for your application you could use:

   [:pagelist group=MyGroup fmt=dictindex list=normal:]

and you'd get all of the pages except headers, footers, recent changes, 
recent uploads, etc.

I'm not too fond of the names "list=" and "normal" for this option, but 
they're the best I could come up with at the moment.  I'll be very 
happy to hear if anyone has anything better.

A wiki administrator can also create custom options for "list="; i.e.,
an administrator could define "list=calendar" to return only those 
pagenames that match a calendar yyyy-mm-dd format:

   $SearchResults['calendar'][] = '/\\.\\d{4}-\\d\\d-\\d\\d$/';

and then:

   [:pagelist list=calendar:]

shows all of the calendar pages.

An administrator can also modify 'list=default' to change the set
of pages returned by default, and PmWiki provides 'list=all' to display
all pages if the default has been modified.

The list= parameter will appear in 2.0.devel14.

Pm



More information about the pmwiki-users mailing list