[pmwiki-users] edit template for specific pages
Tegan Dowling
tmdowling at gmail.com
Tue Mar 28 20:36:04 CST 2006
On 3/28/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>
> On Tue, Mar 28, 2006 at 04:36:23PM -0600, Tegan Dowling wrote:
> > On 3/17/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >
> > On Fri, Mar 17, 2006 at 12:53:48PM -0600, Patrick R. Michaud wrote:
> > > On Fri, Mar 17, 2006 at 07:38:28PM +0100, noskule wrote:
> > > > hi list
> > > > How do I setup a rule that a pagetemplate will be used if the
> > pagename
> > > > is "GroupConfiguration" ?
> >
> > $EditTemplatesFmt = 'Site.{$Name}Template';
> >
> > Yes, just one line!
> >
> > This is dynamite. Then is this doable now, or would any wizard care
> to
> > concoct the code for:
> >
> > $EditTemplatesFmt = 'Site.*{$Name}Template';
> > So that I can create Site/FooTemplate, and then when, in any
> wikigroup,
> > someone creates pages AFoo, BFoo, and CFoo, the *Foo template is
> applied
> > to all three?
>
> $pagename = ResolvePageName($pagename);
> if (preg_match('/Foo$/', $pagename)) $EditTemplatesFmt = '
> Site.FooTemplate';
How to use this: It looks to me as if I'll need to declare what Foo is in
the config.php file, is that correct? Unlike *{$Name}Template, which allows
me to identify template pages by creating them within the wiki?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060328/d0b16e35/attachment.html
More information about the pmwiki-users
mailing list