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

Kathryn Andersen kat_lists at katspace.homelinux.org
Thu Mar 8 19:08:03 CST 2007


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

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 Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe



More information about the pmwiki-users mailing list