[Pmwiki-users] Setting Sidebar to ThisGroup:SideBar

Patrick R. Michaud pmichaud
Thu Feb 12 08:20:11 CST 2004


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.

> 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';

should work.  :-)

Pm



More information about the pmwiki-users mailing list