[pmwiki-users] new page attribute

Patrick R. Michaud pmichaud at pobox.com
Mon Sep 25 21:08:03 CDT 2006

On Mon, Sep 25, 2006 at 09:53:02PM -0400, Crisses wrote:
>    On Sep 25, 2006, at 9:11 PM, Patrick R. Michaud wrote:
>        I wanted it for *inside* pagelist format rules...
>      Ah, I thought you wanted to only display pages that had a summary.
>    I also want something like:
>    when $:BookAuthor begins with A
>    make pagelist (sorted):
>    pagelink - page{$:BookAuthor} - page{$:BookTitle}
>    Or something like that.
>    It's a pretty simple index, it just returns some fields in the listing.

Well, getting the pagelist itself is pretty simple:

    [[{=$FullName}]] - {=$:BookAuthor} - {=$:BookTitle}

The tricky part so far is "when $:BookAuthor begins with 'A'";
ideally (for efficiency/speed reasons) it really should be coded as 
part of the (:pagelist:) directive and not a pagelist template.

The best idea I have so far (just thinking about it off the top of
my head) is

    (:pagelist $:BookAuthor=A* fmt=... :)

but this may require some substantial coding in (:pagelist:) to
make it happen.  Similarly, for sorting on a page text variable,
we'd have:

    (:pagelist order=$:BookAuthor ... :)


More information about the pmwiki-users mailing list