[pmwiki-users] Different template for individual pages?
Brian Connolly
bconnolly at furthermore.com
Fri Feb 10 21:07:39 CST 2006
And, for those of you following at home, don't forget to nix the native $Skin = ""; line in config.
Had me stumped for a good 20 minutes. :)
All good.
Thanks all!
-brian
-----Original Message-----
From: H. Fox [mailto:haganfox at users.sourceforge.net]
Sent: Friday, February 10, 2006 6:08 PM
To: Brian Connolly
Cc: Kurt Devlin; pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] Different template for individual pages?
On 2/10/06, Brian Connolly <bconnolly at furthermore.com> wrote:
> I see. I think I've got a different equation actually.
> Rather than 1 page using default, I've got three pages using
> "red" and all others using the default.
It was a one-page-not-like-the-others solution. For completeness,
here's a tested three-pages-[...] alternative:
$pagename = ResolvePageName($pagename);
$RedSkinPages = array(
'SomeGroup.SomePage' => '',
'Main.WikiSandbox' => '',
'SomeGroup.SomeThirdPage' => ''
);
if (array_key_exists($pagename, $RedSkinPages)) SDV($Skin, 'red1');
SDV($Skin, 'light');
This might be harder to set up, but IMHO it's easier to maintain. I
prefer having group-specific and page-specific customizations in
config.php rather than having lots of oddly-named files in the local/
directory, but that's just a preference.
> I think the other solution is probably simpler for me.
Go with what works! :-)
Hagan
> -----Original Message-----
> From: H. Fox [mailto:haganfox at users.sourceforge.net]
> Sent: Friday, February 10, 2006 4:53 PM
> To: Brian Connolly
> Cc: Kurt Devlin; pmwiki-users at pmichaud.com
> Subject: Re: [pmwiki-users] Different template for individual pages?
>
> On 2/10/06, Brian Connolly <bconnolly at furthermore.com> wrote:
> > Hagan... Couldn't get that one to work. DRAT.
>
> Sorry about that. I did test it. Here's the exact clip from my
> config.php file:
>
> $pagename = ResolvePageName($pagename);
> if ($pagename == 'Main.WikiSandbox') {
> SDV($Skin, 'pmwiki');
> } else { SDV($Skin, 'light'); }
>
> It causes the default skin to be applied on the Main.WikiSandbox page only.
More information about the pmwiki-users
mailing list