[pmwiki-devel] FmtTemplateVars function

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 10 12:11:39 CST 2009


On Tue, Feb 10, 2009 at 05:39:41PM +0000, Hans wrote:
> Tuesday, February 10, 2009, 5:08:25 PM, Patrick wrote:
> > 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.
> 
> We have a collection of pages, each contains a record for a contact.
> Each may contain items like
> 
> Name: Joe
> Surname: Miller
> Group: Development
> Tel: 01234567
> 
> These can be accessed as PTVs.
> 
> But we want to access them via display templates.
> Here is one:
> 
> [[#default]]
> *'''{$$Name} {$$Surname}''' ''{$$Group}'' {$$Tel}
> [[#defaultend]]

If these are in fact PTVs, then shouldn't the
template substitution markup to be used be either 
{$:Name} or {$$:Name} ?  The colon is an important
signifier in distinguishing page text variables from
other page variables.

> The template is used by the extraction routine,
> which could be a pagelist directive using a special template with
> (:include Template#default parameters...:)
> or a page with  a series of (:include ...:) directives
> or some other mechanism which calls FmtTemplateVars to do the
> variable replacements on the template text.

Could I see some actual examples of how you intend to
be using (:include:) in this case?  I suspect that PmWiki
already provides capabilities to do whatever you're wanting
to do (or can be easily extended to do so) without having
to modify existing markup definitions.

Pm



More information about the pmwiki-devel mailing list