[pmwiki-users] Pm's whereabouts, 2.2 status

Patrick R. Michaud pmichaud at pobox.com
Tue Nov 13 08:15:48 CST 2007


On Tue, Nov 13, 2007 at 08:18:54AM -0500, sti at pooq.com wrote:
> Patrick R. Michaud wrote:
> 
> > I've been seriously under the weather for most of October (and extending
> > into November) and my overall productivity has suffered.
> 
> Well, I hope you're feeling better now, or have a swift recovery if not.
> 
> > I've just updated http://www.pmwiki.org/wiki/PmWiki/RoadMap, but for
> > anything I've forgotten please just send me a message or a message to the
> > list or a note on the RoadMap itself.
> 
> I've recently been bitten by the problems described in PITS entries 986
> through 988:
> 
>   http://www.pmwiki.org/wiki/PITS/00986
>   http://www.pmwiki.org/wiki/PITS/00987
>   http://www.pmwiki.org/wiki/PITS/00988

00987 and 00988 are now fixed for the next release.

I'm still thinking about how I want to do 00986.

> I also see you've mentioned some simple modifications to the trail= option for
> pagelists. There are two trail-related features I've long wanted.
> 
> A) Have a way to augment a pagelist with the contents of a trail, rather than
> just use the trail instead. So, I could have
>   (:pagelist name="Foo" addtrail=Foo.Trail:)
> to list pages named Foo, as well as all pages in Foo.Trail trail. Of course,
>  that makes me think it would be good to be able to do this as well:
>   (:pagelist trail=Foo.Trail add="A.Foo,B.Foo" order=size:)
> To unconditionally add a list of files to a trail and have them all come out
> in the right order.

Being able to merge separate pagelists is a bit beyond what I've
wanted to provide or support in the core.  However, if we go down
that path, I'm thinking it may end up following the lines of
Christian Ridderström's proposals of being able to perform unions
and intersections of individual (:pagelist:) commands:

    # save all pages named 'Foo' in a list named 'abc'
    (:pagelist name=Foo saveas=abc:)

    # save 'Foo.Trail' in a list named 'def'
    (:pagelist trail=Foo.Trail saveas=def:)

    # display the combined pages of lists 'abc' and 'def'
    (:pagelist combine=abc,def order=size fmt=#whatever:)

> B) Have some way to search for the first of a set of existing pages to find a
> trail. I have cases where I want to say something like:
> 
>   (:pagelist fmt=blog
> trail={*$FullName}-BlogTrail,{*$Group}.BlogTrail,{$SiteGroup}.BlogTrail :)
> 
> So that I can have a pagelist that can be invoked within another pagelist
> (which is called from various places), but do the right thing in each case.

This sounds more like a markup expression or page variable than something
that needs to be added to pagelist.

As a markup expression, perhaps we define a {(firstexists ...)} expression
that returns the first existing page of a list of pages:

  (:pagelist fmt=blog trail={(firstexists {*$FullName}-BlogTrail,{*$Group}.BlogTrail,{$SiteGroup}.BlogTrail)} :)

As a page variable, define a {$BlogTrail} variable that returns
the correct blogtrail page for any given page

  (:pagelist fmt=blog trail={*$BlogTrail} :)

where the {$BlogTrail} page variable is defined something like

  $FmtPV['$BlogTrail'] = 'BlogTrailOfPage($pn)';

  function BlogTrailOfPage($pagename) {
    $BlogTrailPath = array('{$FullName}-BlogTrail', '{$Group}.BlogTrail',
                           '{$SiteGroup}.BlogTrail');
    foreach ($BlogTrailPath as $b) {
      $name = FmtPageName($b, $pn);
      if (PageExists($name)) return $name;
    }
    return $name;
  }
     

Pm 



More information about the pmwiki-users mailing list