[pmwiki-users] About {$:var} text-variables

The Editor editor at fast.st
Fri Sep 8 12:12:49 CDT 2006

I've been amazed at how my innocent request for a way to set page
variables specific to pages as they were iterated through a pagelist
has exploded into a fullscale discussion about making a major upgrade
to PmWiki!  (A discussion that seems to be disintegrating into
multiple threads...)  Being away from my cave, I've been unable to
keep my posts up with the discussion but have been following along and
want to add a few general thoughts now.

First the use of {$:var} is a great notation with multiple uses,
including a natural extension of the FAST Data recipe, and it meets
all my needs in terms of pagelists, etc.  I am most eager to get at
least this much available as soon as possible, whether we are settled
on other syntax yet or not.  Parsing the page text like this is a
brilliant idea.

Being able to override the page this var is set from is also great,
i.e.  {Group.Name$:var}.  The problem though as it seems to me is
there will be many times the Group and Name variable will be dependent
on a page variable themselves.  On my site, a growing number of pages
are dynamically created using groupheaders/footers and I do this kind
of stuff all the time.  I also do this with many applications of the
FAST Data recipe.

Suppose for example I have a "Messages" group with pages for each
member id that extracts say their real name from their profile page.
So on Profiles.Caveman I could have a line which says RealName: Dan.
Then in the Messages groupheader I might have a line which says "Send
message to {Profiles.{$Name}$:RealName}".  The goal would be to show:
"Send message to Dan" when I click on Messages.Caveman.  Is this kind
of notation going to be available and if so what would it look like?
Note FAST Data already does this so it's not critical--just a point of

As far as adding capabilities to allow php functions, cross farm
reading, data clips, etc, it seems the goal should be simply to allow
hooks for recipe writers and leave those kind of applications for the
cookbook.  I'm not sure the core needs to have all these features
built in to it, at least from my perspective as I can't think of many
uses I would have for them.  PmWiki philosophy suggests features be
added to core primarily when they cannot be done with recipes.  Is
this applicable here?

My hope in saying this, of course, is that the essential functionality
could be released sooner if we lower our objectives for core just a

I'd also appreciate it if someone could explain why a {.$:var} syntax
is necessary.  I had trouble following that thread and would
personally like to know what's behind it before I have to go though
all my sites and change a bunch of markup.  Of course, I'm willing to
for the good of PmWiki, but the reason wasn't clear.  On a practical
note, I use these variables  in groupheaders/footers all the time,
expecting them to refer to the page not the groupheader.  If these
continue to work as now for these kinds of pages (I believe Pm said
that would be the case) that would probably eliminate most of my
problems. If not it will be a disaster for my sites.

At the same time I must confess I feel a bit uncomfortable with page
variables working one way in some kinds of pages, and another way in
other kinds of pages.  That may be more trouble explaining that it's
worth.  Could we just say if no group or name is specified {$:var}
refers to the current page whether there's a dot or not.  Or perhaps
{$var} would work one way and {$:var} could work another.  I don't
know just thinking out loud.

Thanks for a careful, deliberate, forward thinking community at
PmWiki, and my commendations to Pm for his leadership.


More information about the pmwiki-users mailing list