[pmwiki-users] hierarchical groups, revisited

Américo Albuquerque aalbuquerque at lanowar.sytes.net
Fri May 26 17:55:28 CDT 2006

Patrick R. Michaud wrote:
> On Thu, May 25, 2006 at 10:51:23PM +0100, Américo Albuquerque wrote:
>>From: "Patrick R. Michaud"
>> > After this page is created (and has links to it from other places),
>> > someone decides that Animal.Canine should have subpages in it such as
>> > Animal.Canine.Beagle and Animal.Canine.Terrier. So, they create
>> > Animal.Canine.$GroupPage to be the home page for the canine group.
>> >
>> > What happens to the original Animal.Canine page? We can't just
>> > move its contents to Animal.Canine.$GroupPage, because then all of
>> > its links will be broken. And we can't say that /Animal/Canine
>> > is the same as /Animal/Canine/$GroupPage, because then we don't
>> > have a way to get to the contents of the original Animal.Canine page.
>>I didn't say that, what I said was that the /Animal/Canine group is the
>>same as saying /Animal/Canine/$GroupPage. In your example you would have
>>2 Canine pages set, the first would be /Animal/Canine and the 2n would
>>be /Animal/Canine/$GroupPage. 
> Ahh, *two* separate pages, each with a separate url.  (I was reading
> "/Animal/Canine group" as "/Animal/Canine url" in your message, sorry.)
That could also work. That would mean that the default page of a group 
would be a page with the same name in the same level of the group, ie., 
the default page of the /Animal group would be /Animal page and the 
default page of the /Animal/Canine group would be /Animal/Canine page. 
In this format there would be no need for the $GroupPage variable since 
the default page would be fixed

> That goes against what most people expect, but yes, it could work
That's because of the url way of dealing with folders. A folder url to 
/Animal is redirected to /Animal/$GroupPage (where $GroupPage is one o 
index.html, index.html.var, index.php, etc, as defined in the apache 
config or in IIS) The filesystem (that the webserver uses to save both 
pages and folders) simply doesn't allow to have a folder with the same 
name as a file (both called Animal)

> this way.  I think with this approach we'd likely end up with a
> lot of "Animal.Canine" pages that contain (:redirect /Animal/Canine/Home:)
> or some such, and then people would want to have a way for the wiki
> to perform the redirects "automagically" instead of having to build
> the extra page at each step.  But yes, I can envision that it might
> be workable.
What do you mean? Having the page /Animal/Canine to have a redirect or 
that pages in the /Animal/Canine group have that redirect done automaticaly?

> Somehow I don't see the XPath syntax for relative links as being 
> very usable or desirable for the average author that PmWiki targets.
> So I'd still be interested in a syntax for this.
If you see the PmWiki targets as having the default page of group as a 
page with the same name in the same level you'll see that xpath would 
work great. The problem is how to diferenciate between /Animal/Canine 
and /Animal/Canine/Home. Whatever syntax you use you'll have the same 
problem. Both pages are similar thought might have different content

Also there is the problem between links of siblings and links between 
childs. Xpath uses [[link]] to link to childs and [[sibling:link]] for 
siblings. PmWiki, on the other hand, doesn't have a concept of child. 
The first level is always a group and the second level is always a page. 
That means that [[link]] will always link to a sibling. That's why is 
dificult to use hierarchical groups/pages in PmWiki, the system simply 
wasn't thought that way. It would probably be easier to use Categories 
to implement hierarchical pages and implement a way of linking through a 
Category path instead of a page path, although both systems could work 
toguether. That would mean something like [[CategoryPath:page]] to link 
to the page in an hierarchical way and [[Group/Page]] in a PmWiki way. 
The Category path could use the ':' as separator to avoid being confused 
with the '.' or '/' PmWiki path notation

More information about the pmwiki-users mailing list