[pmwiki-users] Request for feedback on Fox modification

Hans design5 at softflow.co.uk
Sat Sep 29 11:05:55 CDT 2007


Saturday, September 29, 2007, 3:27:55 PM, Hans wrote:

> To make this change I need to change the handling of replacement
> variables encountered in a template. The general syntax is
> {$$varname}, and fox.php replaces this with the value found in field of
> name 'varname'. If a field with such a name does not exist, an empty
> string will be inserted instead of the {$$varname} placeholder.

> I propose that fox.php will check if a 'varname' field exists, and if
> no such field exists it will leave the {$$varname} untouched, i.e.
> insert {$$varname} in the posted page (or content).

I see now that this may lead to confusion in the template syntax.
So I think it is better to use unique markup in th etemplate to
designate replacement variables which should not be processed, but
posted as replacement variables instead. I.e
{$$$name} will be posted as {$$name}, and
{$$$name[]} will be posted as {$$name[]} (for array fields).
Even the Fox specific date replacement markup could be treated that
way, i.e.  {$$$...} will be posted as  {$$...} and no replacements
made.


  ~Hans




More information about the pmwiki-users mailing list