[pmwiki-users] The Template Shuffle

David Spitzley dspitzle at wash.k12.mi.us
Fri Apr 15 13:03:22 CDT 2005


Not being conversant in regexp, would that translate as (:edittemplate:)
unsetting the template, then?


David

>>> "Patrick R. Michaud" <pmichaud at pobox.com> 04/15/05 1:52 PM >>>
On Fri, Apr 15, 2005 at 01:42:41PM -0400, David Spitzley wrote:
> I'm drafting the Cookbook entry for this, and I just wanted to check:

> how would you unset the template for a page with this directive (if
at
> all)?  I tried all of the following:
> 
> (:template:)
> (:template "":)
> (:template :) (one space after template)
> (:template  :) (two spaces after template)

Well, I'm now wondering if the directive should be (:edittemplate:) 
(just for clarity).  Then the directive to unset a template could
be anything that matches  \\(:edittemplate\\s*:\\).

Thus we'd end up with something like:

Markup('edittemplate', 'directives',
  '/\\(:edittemplate(\\s+(\\S+))?\\s*:\\)/e',
  "PZZ(\$GLOBALS['FmtV']['\$LinkTemplate'] = '$2' ? '&amp;template=$2'
: '')");

Pm




More information about the pmwiki-users mailing list