[pmwiki-devel] FmtTemplateVars function

Hans design5 at softflow.co.uk
Wed Feb 11 10:44:08 CST 2009

Tuesday, February 10, 2009, 7:32:12 PM, Patrick wrote:

> We can also update FmtTemplateVars to do things based on PTVs --
> i.e., {$$:Name}  would be an immediate template substitution of
> the 'Name' PTV for a page.

you mean a straight substitution like with this change,
adding one line?

  foreach(preg_grep('/^[\\w$]/', array_keys($vars)) as $k)
   if (!is_array($vars[$k])) {
     $text = str_replace("{\$\$$k}", $vars[$k], $text);
     $text = str_replace("{\$\$:$k}", $vars[$k], $text);

That would be useful.


More information about the pmwiki-devel mailing list