|
StirlingWestrupThis page proposes a syntax by Stirling Westrup as outlined at HierarchicalGroups-Proposals. Stirling Westrup's ProposalIn order to make it easy to push content up and down the group hierarchy, the only distinction that should be made between a page and a group is that a group has pages below it. Both should be editable as wiki pages, sections should be as easy to set up as just creating pages below an existing page in the hierarchy and inserting an appropriate We might then have Group.Page.Intro, Group.Page.Section-1, Group.Page.Section-2, etc and Group.Page itself (which is now also a group) might be blank except for an implicitly included pagelist in its header or footer. As the sections grow, they can easily become full pages and the Group.Page could have its pagelist modified to list its children, rather than including them. Blurring the distinction between groups and pages in this way would seem to be a good thing, so to emphasize this, from now on I shall only refer to pages and sub-pages, not to groups. I've decided that I do want to worry about backwards compatibility in link semantics, or it may otherwise be very difficult to implement Hierarchical Pages on my existing wikis -- something I very much want to do. This would require that [[A]] be a relative link to sibling page A (a child of the current page's parent), [[A.B]] be an absolute link to sub-page B of topmost page A, and [[A.]] be a link to the default sub-page of topmost page A. On existing wikis this default page might be [[A.A]] or [[A.Home]] (as it is on mine), while on newer wikis we'll probably want it to be the topmost page A itself. As well, in the current PmWiki implementation, the only distinction between . and / in links is how the resulting link is displayed. Thus, in what follows any . and / can be freely interchanged to result in identically functioning links. This did put certain constraints on the allowable syntaxes. To make matters worse, I decided not to introduce any new special characters. Finally, it makes sense that there be a single distinguished topmost page that all existing top-level pages would be sub-pages of. This would allow for more easily inheriting properties down the page hierarchy. The distinguished page could also be useful for storing all of the information which is currently stored under Site. The name of the distinguished page would probably be configurable as $TopPage or something similar. PM (and others) might well prefer it have a default name like TOP or <PmWiki>, but I'm going to suggest it be called ^ (circumflex). This is the assumption I use in all my examples below. As a practical matter, the page name ^ would be stripped from page names saved in wiki.d/ so that ^.Main.HomePage would be saved as Main.HomePage as it currently is. The page ^ itself would (naturally) be immune to this, although it may be saved with some other special name in the actual wiki store. To illustrate some of the properties (and problems) of this approach, I'm going to assume a slightly modified version of the hierarchy given above. ^ +-Kingdom | +-Plant | | +-Grass | +-Animal | +-Canine | | +-Terrier | +-Feline | +-Cat +-Mineral +-Gold
Proposal CommentsA couple of questions for this proposal. (I'll probably have more, but these are the ones that jump out at me at the moment.)
- PM
I would like to say that any passwords on a page automatically apply to all its subpages except where overridden, but I also don't want to break working wikis where the attributes for SomeGroup are stored in SomeGroup.GroupAttributes.
Ideally GroupAttributes, GroupHeader and GroupFooter would eventually be migrated into the metadata for a page, and would apply to that page and all its subpages. During the transition though, we would probably say that any page named GroupAttributes, GroupHeader or GroupFooter would have its contents applied to its parent page and all its children, except where overridden in a subpage. This would mean that when displaying the page at ^.Foo.Bar.Baz, it would be necessary to look for ^.Foo.Bar.Group*, ^.Foo.Group* and ^.Group* to know what headers, footers, and passwords applied. - StirlingWestrup |
||||||||||||||||||||||||||||||||||||||||||||||||