[pmwiki-users] Per-Group Sidebars?

Marc Cooper gmane at auxbuss.com
Sat Jul 15 10:36:34 CDT 2006


Patrick R. Michaud said...
> On Fri, Jul 14, 2006 at 08:32:28PM +0100, Marc Cooper wrote:
> > Patrick R. Michaud said...
> > > On Thu, Jul 13, 2006 at 03:19:52PM -0500, Michael Gleicher wrote:
> > > > Is it possible to specify a different sidebar to be used by a particular 
> > > > group?
> > > 
> > > Sure, just create a page called "SideBar" in that group -- it will
> > > replace the default Site.SideBar.
> > 
> > An alternative way to do this is to remove the code in the skin that 
> > gives priority to $group.sidebar over $site.sidebar and embed the 
> > $group-specific sidebar code within the $site.sidebar with something 
> > like:
> > 
> > (:if !group site :)
> > (:include {$Group}.sidebar:) (:if:)
> 
> Still another way to do it is to have the group-specific sidebar
> use
> 
>     (:include Site.SideBar:)
> 
> at the appropriate place (usually either the top or bottom of
> the group-specific sidebar).

Ah ha. That's better in many cases, since it won't "break" existing 
templates - or require them to be changed.

However, when the required sidebar contains site stuff, then (optional 
group stuff, then more site stuff, then it's not so clear.

Of course, site.sidebar could then contain:

  site stuff
  (:include Site.SideBarMoreStuff:)

and the group.sidebars

  (:include Site.SideBar:)
  group stuff
  (:include Site.SideBarMoreStuff:)

Just floating it out there ;-)

-- 
Best,
Marc





More information about the pmwiki-users mailing list