[pmwiki-users] The Template Shuffle
David Spitzley
dspitzle at wash.k12.mi.us
Fri Apr 15 14:07:27 CDT 2005
Spiffiness incarnate. As of a couple minutes ago, this is all written
up in http://www.pmwiki.org/wiki/Cookbook/EditTemplates . Many thanks
for the help; I expect this may be getting a >lot< of use on my site.
David
>>> "Patrick R. Michaud" <pmichaud at pobox.com> 04/15/05 2:19 PM >>>
On Fri, Apr 15, 2005 at 02:03:22PM -0400, David Spitzley wrote:
> Not being conversant in regexp, would that translate as
(:edittemplate:)
> unsetting the template, then?
(:edittemplate Content.Somewhere:) sets the edit template
(:edittemplate Content.Elsewhere:) sets it to something else
(:edittemplate:) unsets the template
(:edittemplate :) same thing
(:edittemplate :) still the same
(:edittemplate :) okay, you get the idea
Pm
> >>> "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' ?
'&template=$2'
> : '')");
>
> Pm
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list