HgUrls

Summary: Rewrites hyphens "-" to slashes "/" in URLs.
Version: 2008-05-04
Prerequisites: PmWiki 2.2beta. Otherwise none, but currently only useful in conjunction with Cluster.
NOTE: This recipe is a subset of Hg, so do not use it if you have Hg installed!
Status: Beta
Maintainer: CRAjr
Categories: Hierarchy | PageNaming
Discussion: HgUrls-Talk

Questions answered by this recipe

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Is there a way to get Cluster to understand pseudo-hierarchical URLs with slashes between groups instead of hyphens (like Hg)?

Description

HgUrls is a subset of the Hg hierarchical groups recipe, and should NOT be used in conjunction with Hg, since this functionality is already included! It translates pseudo-hierarchical URLs between hyphens "-" and slashes "/".
So,
Group/SubGroup/SubSubGroup/Name  resolves successfully as
Group-SubGroup-SubSubGroup.Name  and vice-versa.

Notes

I am using Cluster in many of my Wikis, but also need the "hyphen to slash" translation that is built into Hg. The original idea for this recipe is from an email list discussion between ...

  • Dan Vis, creator of Hg
  • Kathryn Andersen, creator of Cluster
  • Patrick R. Michaud, creator of the PmWiki universe

Based on Hg by Dan Vis, Copyright 2007.

At the moment, HgUrls is only useful in conjunction with Cluster. If you find another use, please add a comment.

Installation

Install by downloading hgurls.phpΔ to your cookbook directory, then add to your local config file:

include_once('cookbook/hgurls.php');

You  must  load HgUrls  before  loading Cluster!

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See Also

Cluster
Hg

Contributors

Comments

See discussion at HgUrls-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.