[pmwiki-users] Re: Search results: show page-titles

Patrick R. Michaud pmichaud at pobox.com
Mon Nov 21 17:26:21 CST 2005

On Mon, Nov 21, 2005 at 05:59:13PM -0500, Martin Fick wrote:
> > But along these lines, I'm rapidly becoming a fan of the approach
> > that the PageListTemplates recipe is taking, although I'm
> > not sure I agree with the exact format of the {$...} markups
> > it's using.  But with some modifications it might become a core
> > candidate sometime in the very near future.
>   Fire away with suggestions please!! :)

I was thinking shorter rather than longer, and overloading
{...} rather than using (:...:).

Currently we have {$Name}, {$Title}, {$Group}, etc., all
of which refer to the currently browsed page (the one that
appears in the browser's address bar).  For compatibility
reasons (and because they're the common case) I don't want
to change those.  

Playing with syntax a bit, we want to get pagenames in
there somewhere.  It makes sense to indicate up front
the page name we're talking about, so perhaps the
generic long form is {Group.OtherPage$Title}, with
{OtherPage$Title} being available for pages in the same
group.  So, one could then write

    [[OtherPage]] was last modified on {OtherPage$LastModified}.

For page templates, we're typically looping through a
set of selected pages and generating output, so we'd want
some sort of marker that means "the current page of
interest".  However, I'd also like to be able to
get at this in other markups, such as links, and it
ought to be something that doesn't get in the way too
much.  So, perhaps something like {^$Title} or {+$Title}
to mean "the title of the most recently referenced page".

It'd be really cool to be able to write things like

    [[OtherPage?action=edit | Edit {+$Title}]]
    [[SomePage]] was last modified on {+$LastModified}

and have the "+" know what to do in each case, but
the markup sequencing right is very very tricky in 
those cases.  I might have to wait until later.

Anyway, I don't have the exact syntax I'd like to use
yet, but I'm wanting to stay closer to {$...} and
to make sure it's not too long to write and understand.


More information about the pmwiki-users mailing list