[Pmwiki-users] Re: Setting Sidebar to ThisGroup:SideBar
Christian Ridderström
chr
Thu Feb 12 11:48:30 CST 2004
On Thu, 12 Feb 2004, Patrick R. Michaud wrote:
> On Thu, Feb 12, 2004 at 09:38:18PM +1100, Richard Canning wrote:
> >
> > What I am wanting to do is put into local.php something that will change
> > the defult of the sidebar to be whatever the current group is then the
> > page under that group called SideBar.
> >
> > I was hoping something like
> > $PageLayourFmt['wikileft'] = "ThisGroup:SideBar";
> > would work, but it doesn't.
>
> $PageLayoutFmt['wikileft'] = 'wiki:$Group.SideBar';
>
> should work, since these are $...Fmt variables.
>
> > Ultimately I would like to have it use ThisGroup:SideBar if there is a
> > sidebar file for that group, and use Main.Sidebar if it doesn't. I have
> > absolutely no idea how to do this.
>
> $PageLayoutFmt['wikileft'] = 'wiki:$Group.SideBar Main.SideBar';
>
> should work--it uses Group.SideBar if it exists, and Main.SideBar if not.
Couldn't you (Pm) use this at pmichaud.com? I think it'd be useful there
-- rather than having the same sidebar everywhere.
> > Also, many of the people I do sites for like to have the sidebar on the
> > right instead of on the left, would it be easy/possible to have it so that
> > the sidebar has an option that allows you to chose the side, which could
> > then default to left?
>
> $PageLayoutFmt['wikileft']='';
> $PageLayoutFmt['wikiright'] = 'wiki:$Group.SideBar Main.SideBar';
What do people think about this (default?) behaviour:
If the page '$Group.SideBarLeft' exists, => left sidebar,
otherwise, if 'Main.SideBarLeft' exists => left sidebar
If the page '$Group.SideBarRight' exists, => right sidebar
otherwise, if 'Main.SideBarRight' exist => right sidebar
/Christian
--
Christian Ridderstr?m http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list