ZeroMasterGroup

Summary: Shorter URLs by introducing an omittable master group
Version: 1.1
Prerequisites: PmWiki 2.1.3
Status:
Maintainer: hartwork

Questions answered by this recipe

My wiki mainly uses a single group. Is there a way to strip the group name from the URLs?

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

Description

This recipe makes it possible to omit a "master" group to make your URLs as short as possible. So if your master group is "Emulation" you can use http://www.example.com/MAME instead of http://www.example.com/Emulation/MAME .

Installation

1. Download

Download this patch file:

2. Apply

Copy it to the directory containing pmwiki.php and apply the patch:

patch < zero_master_group.diff

3. Config

To make a group other than Main the zero/master group you can change line ~45 of pmwiki.php to

define( "ZERO_MASTER_GROUP", "<group_name_here_please>" );

I would have pulled this into config.php but it is not possible to do this in an easy way.

To prevent PmWiki from automatically "fixing" your URLs by adding the group in front of the pagename you might also want to add

$EnableFixedUrlRedirect = 0;

to config.php .

Notes

This recipe is a patch written for PmWiki 2.1.3.
It might work with later versions but is not guaranteed to.

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".

Comments

See Also

CleanUrls
OneGroupForAll

Contributors

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.