[Pmwiki-users] Page tree with minimal syntax -- some problems
chr@home.se
chr
Wed Oct 20 12:46:47 CDT 2004
This is based on something Patrick wrote a while back. I thought it was
illustrating so I've modified it slightly.
In order to keep the post shorter, I'll just discuss the problems here,
and then suggest solutions in some replies.
On Wed, 9 Jun 2004, Patrick R. Michaud wrote:
> Let's suppose I have a set of pages that collectively describe PmWiki,
> such as documentation, FAQs, etc. Clearly they belong in a common
> group, such as "PmWiki", thus I have PmWiki.DocumentationIndex,
> PmWiki.Installation, etc. I also need a page to serve as the "entry
> page" to the group, to describe PmWiki itself.
In PmWiki 1, we have this structure
PmWiki/ (the '/' indicates it a group, not a page)
|-- PmWiki <- the "entry page"
|-- DocumentationIndex
|-- FAQs
'-- Installation
However, if we use a page tree we will have this structure:
PmWiki (the entry page, now at the root level)
|-- DocumentationIndex
|-- FAQs
'-- Installation
!!Minimal link syntax
For the discussion I'll define a minimal link syntax (which as part of
solutions to problems further down will be extended).
A link on the page /PmWiki/Installation to /PmWiki/FAQs is simply written
as [[FAQs]] (it's a relative link to a sibling page). Note that on the
page /PmWiki, we can link relatively to itself by writing [[PmWiki]]. We
also allow absolue links, like [[/PmWiki/FAQs]].
!!Referring to sibling pages
Referring to sibling pages is easy. You just write the name, so will for
instance [[FAQs]] refer to /PmWiki/FAQs from the /PmWiki/Installation.
!!Referring to child pages
When referring to a child page, you need to prepend the link with the name
of the current page. For instance, in order to refer to /PmWiki/FAQs from
/PmWiki, you have to write the link as [[PmWiki/FAQs]].
Since the entry page is likely to refer to a lot of it's child pages, this
will get annyoing. Furthermore, if we decide to rename this page from
/PmWiki to /PmWiki2, each link needs to be edited.
Note: If the use of '/' no longer hides the corresponding link components,
[[PmWiki/FAQs]] would be rendered as "PmWiki/FAQs" instead of "FAQs". The
workaround would be to write the link as [[(PmWiki/)FAQs]].
!!Referring to the parent page
A lot of the documentation pages will want to refer to the parent page.
However, using only the link syntax described so far this can only be done
with an absolute link, i.e. [[/PmWiki]]
Note: To have the link render with the "/", it might have to be written as
[[(/)PmWiki]].
/Christian
--
Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list