[Pmwiki-users] Re: Setting Sidebar to ThisGroup:SideBar

Patrick R. Michaud pmichaud
Thu Feb 12 12:21:41 CST 2004


On Thu, Feb 12, 2004 at 07:48:20PM +0100, Christian Ridderstr?m wrote:
> 
> Couldn't you (Pm) use this at pmichaud.com? I think it'd be useful there 
> -- rather than having the same sidebar everywhere.

Sure, that makes sense.  I've just been really busy working on the
0.6 release.  I'll go ahead and configure pmichaud.com for this
behavior but others will have to help with creating useful and 
demonstrative sidebar pages.

Note that one can also do:

   $PageLayoutFmt['wikileft'] = 
     array('wiki:$Group.SideBar','wiki:Main.SideBar');

which displays both Group.SideBar and Main.SideBar in the left panel
(if they exist).

> 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

Well, this is easy enough to do:

    $PageLayoutFmt['wikileft'] = 'wiki:$Group.SideBarLeft Main.SideBarLeft';
    $PageLayoutFmt['wikiright'] = 'wiki:$Group.SideBarRight Main.SideBarRight';

However, I chose "SideBar" over "SideBarLeft" and/or "SideBarRight" to 
keep the page name associated more with its function/purpose rather 
than where it appears in the layout.  Also, keep in mind that with 
the current layout code, a table cell and/or div would be generated for
the wikiright cell even if neither of the *.SideBarRight pages exist,
and this might not be desirable.  In determining whether to create a
div or table cell, the layout code looks to see if $PageLayout['xxx']
is defined, not whether it results in an empty string.

Pm



More information about the pmwiki-users mailing list