[pmwiki-users] Completely clean URLs (Was: Get rid of groups altogether?)

Patrick R. Michaud pmichaud at pobox.com
Wed Oct 26 15:50:20 CDT 2005


On Wed, Oct 26, 2005 at 04:02:04PM -0400, Waylan Limberg wrote:
> Yeah, that does clear up what you are asking and to my knowledge the
> answer is currently  no. Here's why: There seems to be no easy way to
> alter the format PmWiki uses when it generates links to PmWiki pages.

Sorry, I've been away on other projects and haven't had a chance
to respond to this thread.  But I did want to quickly point out that
it should be possible to get PmWiki to generate links w/o group names.
One way may be to change the definition of $PageUrl:

    $FmtP['/\\$PageUrl/'] = '$ScriptUrl/$Name'

Another way might be to have the $ScriptUrl translation 
automatically remove any group name that follows, leaving only 
the page name:

    $FmtP['!\\$ScriptUrl/[^/]+/!'] = '$ScriptUrl/';

Of course, this still means getting PmWiki (or the webserver)
to do the right thing when *receiving* a url without a group,
but I think that getting PmWiki to generate urls without groups
is a solvable problem.

Pm




More information about the pmwiki-users mailing list