[pmwiki-users] Different template for individual pages?
Brian Connolly
bconnolly at furthermore.com
Fri Feb 10 16:47:40 CST 2006
Hagan... Couldn't get that one to work. DRAT.
I resorted to 3 /local/group.pages.php . That works.
-----Original Message-----
From: H. Fox [mailto:haganfox at users.sourceforge.net]
Sent: Friday, February 10, 2006 3:58 PM
To: Kurt Devlin
Cc: Brian Connolly; pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] Different template for individual pages?
On 2/10/06, H. Fox <haganfox at users.sourceforge.net> wrote:
> On 2/10/06, Kurt Devlin <kurt.devlin at gmail.com> wrote:
> >
> > On 2/10/06, Brian Connolly <bconnolly at furthermore.com> wrote:
> > > No page at the link you sent. However, I Googled it and got a rough idea.
> >
> > Pm left off the trailing 's' in the link. It should be
> > http://www.pmwiki.org/wiki/PmWiki/PerGroupCustomizations
> >
> > I added a redirect page at the page Pm listed, but I wasn't quick enough
> > :-)
> >
> >
> > > So... if I wanted the change the skin on the page Main/KeyIssues,
> > >
> > > Put a file in /local called KeyIssues.php. And in it have say...
> > >
> > > <?php
> > > $Skin = 'red1';
> > > ?>
> > >
> > > And modify the skin accordingly.
> > >
> > > Yes?
> > >
> >
> > You got it mostly. To override a specific page, it need to be fully
> > qualified, so you'll need a file called Main.KeyIssues.php. Also, it is
> > usually recommended to leave off the closing "?>" in the PHP.
>
> In pmwiki-2.1.beta21 or newer you can do, in config.php,
>
> $pagename = ResolvePageName($pagename);
> if ($pagename = 'SomeGroup.SomePage') {
> SDV($Skin, 'red1');
> } else { SDV($Skin, 'blue1'); }
Correction: "=" should have been "==".
$pagename = ResolvePageName($pagename);
if ($pagename == 'SomeGroup.SomePage') {
SDV($Skin, 'red1');
} else { SDV($Skin, 'blue1'); }
Hagan
More information about the pmwiki-users
mailing list