[pmwiki-users] New Hierarchical Groups Recipe...

Patrick R. Michaud pmichaud at pobox.com
Fri Feb 2 10:54:25 CST 2007


On Fri, Feb 02, 2007 at 11:00:10AM -0500, The Editor wrote:
> >> I am sure PmWiki could be made to convert a url to Group-Group.Name
> >> from whatever syntax was chosen, though that might require a core
> >> change or two (how does cleanurls do it?).
> >
> >It doesn't require a core change at all.  Simply write a function
> >that does the equivalent of what ResolvePageName() does now,
> >which is to take whatever is given in the url and convert it into
> >a PmWiki-standard pagename.
> 
> Easy enough...  I could do that...  Is that what cleanurls does?
> 
> How do you get your custom function called instead of ResolvePageName?
> That is if someone typed in index.php?n=Animal.Canine.Dog, how do I
> get it to use my function and not the default one?

You don't have to take out the default one (ResolvePageName) -- 
if the pagename is already a PmWiki-standard pagename, then 
ResolvePageName leaves it alone.

> >The problem with using a closing / or . at the end to indicate the
> >group is that many people won't see them there, or recognize that
> >they're a required part of the url.  
> 
> Yes that crossed my mind too.  Do you have a suggestion?  I suppose if
> we just require them to manually enter Homepage, and get [[Group.]] to
> go to Homepage, that would solve the problem, wouldn't it?

While it's one approach, I don't think it "solves the problem", since
the end result is to shift the work away from the computer and
onto people (and add some surprises/frustration in the process).
But that's just my opinion, specific sites might see this as
being an acceptable approach.

Pm



More information about the pmwiki-users mailing list