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

The Editor editor at fast.st
Fri Feb 2 10:00:10 CST 2007


On 2/2/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Fri, Feb 02, 2007 at 10:27:53AM -0500, The Editor wrote:
> > On 2/2/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > >On Thu, Feb 01, 2007 at 08:16:08PM -0500, The Editor wrote:
> > >> The separator can be set to anything, "/" or "." , and it could
> > >> *perhaps* be rewritten to use any of the three options...
> > >
> > >Not only could it cause issues for PmWiki, but people would often
> > >be confused by it as well.  Consider the urls:
> > >
> > >   http://www.example.com/wiki/Animals
> > >   http://www.example.com/wiki/Animals/Canine
> > >   http://www.example.com/wiki/Animals/Canine/Small
> > >
> > >It's pretty clear that the first one refers to Animals.HomePage .
> > >But what about the second... is it referring to the Canine
> > >page in the Animals group (i.e., Animals.Canine), or is it
> > >referring to the home page of the group that has 'Small'
> > >(Animals-Canine.HomePage)?  How would one distinguish the two?
> > [...]
> > 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?

> > But then what do you do if you want a Dog page in Canine?  Using a
> > closing/ or . could indicate you add a HomePage to the end...  That
> > might do it...)
>
> 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.  Sometimes a dot at the
> end of a url is just the period at the end of the sentence.
> People are used to being able to write urls without trailing
> slashes and have them work as if the slash were present.

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?

Cheers,
Dan



More information about the pmwiki-users mailing list