[pmwiki-users] Nested groups
jo at durchholz.org
Fri Jun 3 01:32:55 CDT 2005
Patrick R. Michaud wrote:
> On Thu, Jun 02, 2005 at 09:55:36PM +0200, Joachim Durchholz wrote:
>>One of the problems that Pm mentioned was "no good default policies when
>>incomplete page names are given".
> I mentioned this...? Hmm, I'm not sure why I would've said that.
I was quoting from memory, so I might be entirely wrong with that :-))
>>It occurred to me that such a policy isn't really required. Wiki pages
>>need not be restricted to sitting at leaves, they can also sit at
> FWIW, we've been here in the discussion before -- having wiki
> pages at internal nodes is itself not really a problem.
> It's really the issue of relative links that poses the issue.
>>Another one was "no good syntax for relative links". I have toyed with
>>various ideas, and found this:
>>* It's a solved problem with path-like syntax (i.e.
>> /Main/HomePage is an absolut path, HomePage is a
>> relative path to a page on the same hierarchy level,
>> ../HomePage is the home page "one level up").
> I don't think path-like syntax completely solves the problem.
> Let's suppose I'm on a page [...]/wiki/PmWiki/Variables, and I want to
> link from that page to [...]/wiki/PmWiki/Variables/Basic .
> What do I use as the relative page reference? How about the
> (The "standard" response to the first question is [[./Basic]].
> However, this *isn't* the path-like syntax that most people who work
> with urls and paths would expect. For example, if I'm on a page at
> .../html/path/variable.html and that page contains an href to
> "./basic.html", then I expect it to link to .../html/path/basic.html,
> and not .../html/path/variable.html/basic.html. So, [[./Basic]]
> is *not* the path-like url syntax that most of us who write web pages
> are used to.)
Agreed. The proper way would be to say Variables/Basic. Or something
./Basic doesn't cut it, it would still have to be ./Variables/Basic -
but that's a too fine point to make for an author. I'd avoid using .
entirely, it tends to get interpreted in two different ways and hence
would create confusion for writers ("the link doesn't work!").
The core of the problem is that group names are also page names; in a
file system, a name is either a directory or a file, so it's no surprise
that parts of the analogy break down.
Maybe we should stick with file system semantics, people are used to it.
That would mean that a name should refers to either a group or a page,
but not both.
This requires a rehash of the default policy if a group name is given.
I.e. PmWiki's behavior might be this:
1) Name is a page name
-> Display the page
2) Name is a group name
-> Redirect to <Name>.HomePage (we can't sensibly do Main.<Name>
or <Name>.<Name> anymore, but having so many defaults is
bewildering anyway - besides, I was somewhat surprised that
PmWiki would serve me a seemingly arbitrary page if I just
entered a group name)
3) Name is nonexistent.
-> PmWiki offers to create it as either a group or a page
(assuming appropriate privileges).
More information about the pmwiki-users