tags:

views:

462

answers:

3

I know the Confluence wiki pretty well, and I like much the natural hierarchy of pages you get there. I have to use now a Trac wiki (which is not that bad, same root as MoinMoin), and am searching the feature here. What I want to reach:

  1. Edit the page "MyPage" and enter there the link to a page you want to be a subpage, eg. MySubPage.
  2. The link should be similar to /MySubPage or [/MySubPage]. The character "/" denotes that the resulting page should be a subpage of the current one.
  3. Follow the link, create the new page with some content.

You should now see, that "MySubPage" is a subpage of "MyPage". You could reach the subpage from anywhere by the link MyPage/MySubPage.

The MoinMoin wiki has that feature at least from version 1.5.x, and I have used that regularily. Is there something similar in Trac? Do I have to install then a plugin?

Thank you a lot

Markus

+2  A: 

Parent-child wiki pages aren't directly modeled in Trac. Essentially, "/" is allowed as part of a wiki page name.

You should be able to create a macro that does something like what you want; essentially:

[[sub(MySubPage)]]
retracile
You might take a look at HierWikiPlugin [1].[1] http://trac-hacks.org/wiki/HierWikiPlugin
RjOllos
See also: * http://trac-hacks.org/wiki/ChildNavPlugin * http://trac-hacks.org/wiki/SiblingNavPlugin
RjOllos
+1  A: 

Well, not the best thing to answer the own question, but just something I found out.

 * SubpageFirst
 * SubpageSecond
 * SubpageThird
 * SubpageFourth

leads to (of course) four pages, but when you have a look at them in Title Index, you will see:

 * Subpage
   * First
   * Second
   * Third
   * Fourth

Not what I have searched for, but comes near.

mliebelt
Here is an open enhancement that would "fix" some of this behavior: http://trac.edgewall.org/ticket/6063
RjOllos
You get the grouping behavior because of the way the TitleIndex macro is inserted into /wiki/TitleIndex:[TitleIndex(format=group,min=4)]]
RjOllos
+1  A: 

The only way I have found to do something like this is to specify the full path to the page. For your example this would be [[MyPage/MySubPage]]. You then get a hierarchy in TitleIndex, but it leaves much to be desired in terms of presenting a Parent/Child relationship.

I think, as retracile mentioned, that MyPage/MySubPage does not create a true hierarchy, but rather just a page containing a forward slash in the name, and in TitleIndex the pages are presented such that they appear to be in a hierarchy (but often do not display the way you would like; as I mentioned it leaves much to be desired).

RjOllos