[pmwiki-devel] FmtTemplateVars function

Hans design5 at softflow.co.uk
Tue Feb 10 11:39:41 CST 2009


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.

okay, here is an example:

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]]

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.

Now {$$Name} is not replaced by 'Joe', but by the page name.


Hans




More information about the pmwiki-devel mailing list