[pmwiki-devel] FmtTemplateVars function

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 10 11:08:25 CST 2009


On Tue, Feb 10, 2009 at 04:44:49PM +0000, Hans wrote:
> Tuesday, February 10, 2009, 4:19:58 PM, Patrick wrote:
> 
> > The intent of the extra $ is not to introduce a new class of variables,
> > but instead to say "perform the substitution as soon as the template
> > is read" as opposed to "when it is rendered".  Beyond that it's
> > the same set of available substitutions, and intentionally includes
> > page variables.
> 
> >> I suggest to use either {$PageVar} (like it is used on normal pages)
> >> or perhaps {$$$PageVar}.
> 
> > No.  The whole reason {$$PageVar} exists is so that {$PageVar}
> > _won't_ perform a substitution in a template, and thus someone 
> > viewing/editing the template sees the page variable and not 
> > its substituted value.
> 
> Does this means that we are stuck with this naming conflict?
> The list of page variables is quite long and includes simple words
> like Name, Title, Version, Action, Group,
> all of which someone could easily use as a PTV name in normal text.

Okay, now I'm very confused -- how/where do PTVs enter into this?!
The original message in this thread only talks about page variables 
{$Foo} and template substitutions {$$foo}, and makes no mention 
of PTVs.

> I am not suggesting to create a new class of variables, only a
> different syntax for PVs and for standard template replacement
> variables.

I'd like to understand better the problem you're trying to
solve -- can you give a more complete example of what you're
seeing?

Pm



More information about the pmwiki-devel mailing list