[pmwiki-users] Great pagelist question...

Patrick R. Michaud pmichaud at pobox.com
Wed Aug 30 13:10:57 CDT 2006


On Wed, Aug 30, 2006 at 01:41:45PM -0400, Neil Herber wrote:
> At 2006-08-30  12:11 PM -0500, Patrick R. Michaud is rumored to have said:
> >Having a separate {$:...} accessor for content-based properties 
> >avoids the conflict altogether:
> >
> >    {$Name} -> XYZ              {$:Name} -> Patrick Michaud
> >    {$Group} -> Group           {$:Group} -> PmWiki Enthusiasts
> >    {$Title} -> XYZ             {$:Title} -> Benevolent Dictator
> 
> All Hail the Benevolent Dictator!
> 
> Please be so benevolent as to *NOT* use the colon as the 
> distinguishing mark in this case. It is almost as invisible as the 
> leading space used to denote preformatted text.

Point noted.  I chose the colon because it's mnemonic -- it
mentally attaches to the colon in the markup that separates
the property name from its value, as well as the colons that
make up definition lists (from which values can be grabbed).

I also don't expect the {$:var} notation to be used all that
frequently, so it's not too important if the colon is not there.

I briefly considered {$=var}, since we can think of Property:
markup as assigning values (=) to property names, but then when
the {$=var} markup appears in a pagelist template we get things
like {=$=Description} and the ='s get lost and/or confusing.

> I suspect many heads will be scratched due to a missing colon.  How 
> about something more visible such as:
> $$Title
> $_Title
> or anything else that has a bit of width.

I don't like the $$, because that actually conflates another meaning
in PHP.  $_Title to me looks like an ordinary page variable --
the underscore is commonly a valid character in variable names.
It might be made to work.

We could potentially usurp the tilde from Cookbook.HttpVariables,
so that we end up with {$~var}.  Then our non-displaying "set a
property" lines in markup could look like:

    ~Name: Patrick Michaud
    ~Title: Markup Usurper

which sets values for the "Name" and "Title" properties but doesn't
display them, and gives us our mnemonic connection.

But if we get to that sort of markup, then I think that what we're 
building looks less-and-less like a core feature and much more like 
a recipe.

At any rate, I'm open for suggestions, but at the moment {$:var}
remains my favorite, because it's a natural fit to the "Property:"
markup.

Pm




More information about the pmwiki-users mailing list