[pmwiki-users] Sidebars per Group
pmwiki at ben-amotz.com
Sat Aug 19 07:46:36 CDT 2006
> I'm creating a wiki-alternative for this site: http://www.de-bezieling.nl/
> and all the links in the top bar (Groups, basically)
> have a different set of links (at the left, so in the Sidebar).
> How do I get this done in pmwiki ?
> I've had some advices before, but they didn't work.
> The idea is:
> When a page in Group1/ is called,
> a different Sidebar should load
> than when a page for another group is loaded,
> Group2/ has a different Sidebar from Group3 etc.
> Currently I see that the Sidebar being loaded is always in the "Site/" group.
> Where do I load different links for each Group?
> The links per Sidebar can be hardcoded, they don't have to be a wiki.
> Only each Group's pages need to be wiki-editable.
> So I'm mostly interested in the fastest loading option for the viewer.
> Any advice on this would be welcomed.
FWIW, I prefer sticking with the single Site.SideBar and using a
pagelist template that automatically lists pages in that group. If you
are looking for the fastest loading option then I assume that static
lists should be faster than a pagelist, but question whether you will
notice the difference in speed. In the end, I find the convenience of
only having to edit a single sidebar, and having a complete listing that
is always up-to-date a big plus.
A compromise to consider is to use a pagelist on Site.SideBar, for
yourself when you are editing the site and working on drafts of new or
alternative, and fixed group specific lists for others. To do that,
use Hans' suggestion of adding an include Site.SideBar directive and
then provide conditions based on edit rights, so that readers without
edit rights only see the hard-coded items in each Group.SideBar and
authors with edit rights see the pagelist from Site.SideBar.
As for the top NavBar that appears on the site that you are working
from, you can get that with some skins, such as DropDownSkin and Triad.
For other skins, you can always hack that with a bit of editing. See
Hans' recent comment at Cookbook/FixFlowSkin-Comments ("Does >>lnav<<
exist for FixFlow"). Even for other skins that don't have a PageTopMenu
page, you should be able to make similar changes to the portion of the
css that governs the display of page actions (and, again, you could use
conditionals so that the group listings display for everyone, but the
page actions only display for editors).
More information about the pmwiki-users