|
Cookbook /
ZeroMasterGroupSummary: Shorter URLs by introducing an omittable master group
Version: 1.1
Prerequisites: PmWiki 2.1.3
Status:
Maintainer: hartwork
Categories: Page Naming Schemes
Questions answered by this recipeMy wiki mainly uses a single group. Is there a way to strip the group name from the URLs?
DescriptionThis 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 . Installation1. DownloadDownload this patch file: 2. ApplyCopy it to the directory containing pmwiki.php and apply the patch: patch < zero_master_group.diff
3. ConfigTo 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 . NotesThis recipe is a patch written for PmWiki 2.1.3. Release Notes
CommentsSee AlsoContributors |