[Pmwiki-users] Hierarchical groups
Steven Leite
steven_leite
Tue Jun 8 20:53:09 CDT 2004
On Tuesday, June 08, 2004 4:42 PM [GMT+1=CET],
Patrick R. Michaud <pmichaud at pobox.com> wrote:
> Some suggest using a "parent" operator such as '..' to resolve,
> meaning move
> up one level in the hierarchy, the same as filesystems currently do.
> Unfortunately, '.' is already being used as a group separator
> character.
> I suppose I could change this to something else, but '.' just seems
> natural to me somehow. Alternately, we could use something like '^'
> to mean "parent".
I'd like to see the parent operator as / since that's what used in OS's
> So far I've only come up with three approaches that I think might
> work.
>
> The first is to only allow absolute group names--i.e., all group names
> start from the top. I personally don't have a problem with this, but
> I suspect people will have issues with the lack of a way to do
> relative group references...
Nah, that's not a very good idea.
> Another approach is to just adopt the filesystem (hierarchical
> directory) form of links. This has an advantage of being widely
understood, at
> least among people who work with filesystems. On the other hand, this
> would mean that a reference to [[Alpha/Beta]] would always put "Beta"
> at a level below the current one (i.e., beneath the page named "Alpha"
> at the current level). We'd undoubtedly want some sort of markup
> to indicate "top level", such as a leading '/' or '^'.
Agreed, I like this one best. I would like to stick close to the OS
approach as possible.
>
> The other approach is to use the first component as a relative anchor
> if it occurs in the current group name. Thus, in the page
> Alpha.Beta.Gamma, the link [[Beta.Zeta]] would refer to
> Alpha.Beta.Zeta, [[Alpha.Delta.Epsilon]] would refer to
> Alpha.Delta.Epsilon, and [[Iota.Omega]] would refer
> to Iota.Omega. But this can also get confusing, because
> [[Alpha.Delta.Epsilon]] and [[Delta.Epsilon]] refer to different
> pages, even though [[Alpha.Beta.Zeta]] and [[Beta.Zeta]] refer to the
> same page.
I don't like this approach either. It might get messy if somebody has
several sub-levels.
>
> Anyway, I don't have clean answers, and I've liked the way PmWiki's
> current grouping mechanism works. But if someone comes up with a
> clean alternative, and if a majority of folks like it, I'm certain it
> can be supported.
Here's some examples of the OS approach using the examples you provided
> For example, if we're currently on a page
> called "NFL.Teams.Patriots.Playoffs", then how do the following
> resolve...?
> 1. [[SeasonOpen]] links to NFL.Teams.Patriots.SeasonOpen (standard
> wikiword)
[[SeasonOpen]] would resolve to [[NFL.Teams.Patriots.SeasonOpen]]
> we're currently on a page called "NFL.Teams.Patriots.Playoffs"
> 2. [[Teams.WorkingTogether]] links to Teams.WorkingTogether or
> NFL.Teams.WorkingTogether or
> NFL.Teams.Patriots.Teams.WorkingTogether?
[[Teams.WorkingTogether]] would link to
[[NFL.Teams.Patriots.Teams.WorkingTogether]]
To correctly point it to NFL.Teams.WorkingTogether, you would enter the
link as follows: [[../WorkingTogether]]
[[../../WorkingTogether]] would point to NFL.WorkingTogether, which
would be the same as writing [[/WorkingTogether]].
[[/WorkingTogether/]] on the other hand, would (should) resolve as
WorkingTogether/HomePage (where HomePage is the default page for an
arbitrary Group, set in config.php).
> we're currently on a page called "NFL.Teams.Patriots.Playoffs"
> 3. [[Patriots.Washington]] links to NFL.Teams.Patriots.Washington or
> Patriots.Washington or NFL.Teams.Patriots.Patriots.Washington?
[[Patriots.Washington]] would resolve as
NFL.Teams.Patriots.Patriots.Washington.
To resolve NFL.Teams.Patriots.Washington, you would write [[Washington]]
To resolve Patriots.Washington you would write
[[../../Patriots.Washington]], or more simply [[/Patriots/Washington]].
Additionally, to specify the default page for the Group
Patriots/Washington/ you would write [[/Patriots/Washington/]] or
[[/Patriots/Washington/HomePage]] (where HomePage is the default page
for an arbitrary Group, set in config.php)
> we're currently on a page called "NFL.Teams.Patriots.Playoffs"
> 4. [[Playoffs.WildCard]] links to
> NFL.Teams.Patriots.Playoffs.WildCard, or Playoffs.WildCard?
[[Playoffs.WildCard]] would link to
NFL.Teams.Patriots.Playoffs.WildCard.
To link to Playoffs.WildCard, you would write [[/Playoffs/WildCard]] (or
[[../../Playoffs/WildCard]]
>
> Pm
[Steven]
More information about the pmwiki-users
mailing list