[pmwiki-users] "Where am I?" menu

The Editor editor at fast.st
Thu Mar 8 20:13:18 CST 2007


On 3/8/07, Kathryn Andersen <kat_lists at katspace.homelinux.org> wrote:
> On Thu, Mar 08, 2007 at 03:08:09PM +0200, [] Jamie wrote:
> > One of the problems I have with PMWiki is the two-tier structure. Don't
> > get me wrong, I love PMWiki, but one thing I would like to do is allow
> > users to see where they are in relation to sections and subsections. For
> > example I have pages that sit in a pseudo structure Cruising
> > Info/UK/Marinas/Southampton Marina. Cruising Info and UK sit in the menu
> > structure, the other subsections are just links within the UK subsection.
> >
> > Is there a simple way of having a little box, with links, that says: You
> > are here: Cruising Info/UK/Marinas/Southampton Marina?
>
> You can use Cluster to give a pseudo-hierarchy.
> http://www.pmwiki.org/wiki/Cookbook/Cluster
>
> In your case, you would make a few groups:
>
> CruisingInfo
> CruisingInfo-UK
> CruisingInfo-UK-Marinas
>
> And the page in question would be
>
> CruisingInfo-UK-Marinas/SouthamptonMarina
>
> Then you could make a "breadcrumb" like the following:
>
>         [[{*$g1}/]] \
>         (:if ! equal {*$g2} '':) > [[{*$g1}-{*$g2}/|{*$g2}]](:ifend:)\
>         (:if ! equal {*$g3} '':) > [[{*$g1}-{*$g2}-{*$g3}/|{*$g3}]](:ifend:)\
>         (:if ! equal {*$g4} '':) >
>         [[{*$g1}-{*$g2}-{*$g3}-{*$g4}/|{*$g4}]](:ifend:)\
>         (:if ! equal {*$g5} '':) >
>         [[{*$g1}-{*$g2}-{*$g3}-{*$g4}-{*$g5}/|{*$g5}]](:ifend:)\
>         (:if name -{*$Group},-{$DefaultName} :)\
>         > [[{*$Name}|{*$Title}]]\
>         (:ifend:)
>
> That will give you
>
> CruisingInfo > UK > Marinas > Southampton Marina

Jamie, this should work identically with either Hg or Cluster.  Except
Hg gives you the option of having the following show up in the address
bar.

CruisingInfo/UK/Marinas/SouthamptonMarina

> For an example of this in action, look at
> http://www.katspace.org/Fiction-Stories-KathrynAndersen/Stories-WhatsNew
>
> (Note: I plan to integrate Feral's changes into the main recipe soon,
> but I probably won't be able to get to it for at least a week -- I
> didn't know about them until I looked at the page a few days ago.  Is
> there some way I can get notified of changes to the Cluster page?  I
> know it's up to PM to add people to Site.NotifyList -- is there some way
> of self-registering for that?)

Kathryn, you can register yourself at Site.NotifyList.  The password
is the same as editing the cookbook index page.

Cheers,
Dan



More information about the pmwiki-users mailing list