[pmwiki-users] Re: Unifying variables, attributes, properties, part 2 (attributes)

chr at home.se chr at home.se
Thu Dec 15 18:34:35 CST 2005


On Thu, 15 Dec 2005, Patrick R. Michaud wrote:

> But I'm still likely to slowly migrate things away from FmtPageName to a
> better-named

I also think that FmtPageName() needs a more suitable name. Maybe that 
should be discussed in a separate thread however, perhaps started by you 
explaining its current (and future) intended purpose.

> > >     {=$Name}      - name of the page at the cursor position
> > >     {<$Group}     - group of the previous page
> > >     {>$PageUrl}   - url of the next page
> > 
> >   Yes, very nice, even better than our previous notational
> > ideas.

I like it, however I'm not at all clear as to what the "list of pages" is
in this context that we are "walking" through. If we are talking about
parsing/formatting the output from (:pagelist:) I can see how the list of
pages is clearly defined (it's simply the list of pages generated by
pagelist). But my initial thought was that this should be usable with
trails... leading me to:

> >   Maybe this could even be extended to represent the prev
> > and next page in a trail!
> 
> That's a good idea, then the trail markup could be designed to
> convert
> 
>     <<|SomePage|>>
> 
> to
> 
>     << {<$Title} | SomePage | {>$Title} >>

Here I don't understand how the '{$<Title}' is interreted in a context so 
that it knows *which* list of pages it should work with.

As an aside... would it make sense to extend the notation so that it is
possible to specify the "list of pages" somehow. If nothing in particular
is written, the "current" list of pages is used. However, something like:

	{<$Title(trail=TrailPage)}

would take the list of pages from "TrailPage", take the current page as
the "current" page and use that to find the previous page in the trail,
from which the title is finally extracted.  This might however be way to 
complicated, and the syntax is getting icky.

As an aside.. maybe the syntax would be better if the operator '<' didn't 
show up first. Perhaps like this:

	{$trail(TrailPage).<.Title}

where "trail(TrailPage)" is supposed to symbolize taking the list of pages 
as the trail from the page TrailPage, and ".<." then takes the "previous" 
page etc.

/C

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr







More information about the pmwiki-users mailing list