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

Christian Ridderström chr
Thu Feb 12 13:24:17 CST 2004


On Thu, 12 Feb 2004, Patrick R. Michaud wrote:

> 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.

That'll probably happen by itself --- here I actually tried creating on 
when I noticed that I couldn't :-)

> 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).

That's good to know.

> > 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.

Hmm... good point.

> 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.

Actually, that's what I *didn't* want :-( Isn't there a function that can
tell if a page exists which you can use, like this?

	if(!PageExists("$Group.SideBarLeft", "Main.SideBarLeft"))
	  $PageLayoutFmt['wiki...'] = '';

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list