Content Organization

Version 12.1 by Vincent Massol on 2015/12/11

Nested Pages and SubWikis

You organize content in your wiki by putting them inside pages (a.k.a Documents). Each page usually holds content on a given topic.

However there are several ways to organize your wiki pages:

  • Inside a wiki, you can create a hierarchy of pages, by creating pages inside other pages. This feature is called Nested Pages. For example you could have a page "Product Team" inside a page "XWiki" inside a page "Rue Beaubourg" inside a page "Paris" inside a page "Ile de France", inside a page "France" inside a page "Europe" inside a page "Earth". When viewing the "Product Team" page you would see a Breadcrumb with the following (you can click on the ellipsis symbol to expand the tree):

    breadcrumb-limited.png

    In order to view the full organization of your pages in the current wiki, we offer an Index Application, which has a Tree-view. For example:

    indextree.png

    We also offer Tree navigation in the breadcrumb for each level. For example:

    breadcrumbsTreeNavigation.png

  • You can also have one or several subwikis. There are a few reasons you may want to use a subwiki instead of using Nested Pages:
    • You want to provide custom Applications/Extensions to a group of users of your wiki but not to others
    • You want to implement an XWiki Farm where each wiki is seen as an island (own users, etc)
    • There might be other reasons. See the detailed Wiki vs Nested Pages comparison for more technical details.

Terminology

  • Nested Page (a.k.a Non-Terminal Page): This is a wiki page that can have children pages. Technically a Nested Page is implemented as a Space (i.e. a WebHome page).
  • Non-Nested Page (a.k.a Terminal Page): This a wiki page that cannot have children pages. Applications and script can create Terminal Pages. Advanced Users are also able to create Terminal Pages from the UI. Standard Users are only able to create Nested Pages.
  • Nested Space: A Space which has another Space as parent. Users only have to deal with Nested Pages, which is hiding the fact that Nested Pages are emulated using Nested Spaces. This is why the concept of Nested Spaces still exists.

History

Up to XWiki 7.1, there has been 2 ways to organize content in XWiki: 

  • Wiki > Space > Page (which includes rights inheritance and administration features) 
  • Page > Child page > Child page of child page > ... (which is used for hierarchical navigation purposes) 

Note that both are independent: a page can have a parent page in a different space/wiki than its own .

While this was working, we've found that it could create confusion for end-users, leading to questions such as: 

  • Should I create a wiki or a space for my team? 
  • Which navigation should I put on my home page: list of spaces or treeview of pages? 
  • Can I set rights on a page that is under a space? 

At the same time, for a long time there have been discussions on the list about the future "new model" of XWiki, which would ideally include
Nested Spaces, offering the following features: 

  • Unified way to handle hierarchical navigation (Page > Sub-page > Sub-sub-page >...) 
  • Navigation reflected in URLs (.../PageA/PageB/PageC) 
  • Inheritance of access rights (rights on PageA apply to PageB and PageC, unless defined otherwise. Rights on PageB supersede those on PageA
    and also apply to PageC, and so on.) 

In the end, we took the opportunity to move from the previous way to this new way of organizing pages in XWiki 7.2.

In an ideal world, going from the old model to the new one would imply a total rewrite of the model. Instead of pages and spaces, you would have an entity than is both a container and a document. That entity, probably called a node, would have its own content, associated properties, and a list of children (similar to the way JCR models things).

In the real world, in order not to break retro-compatibility with many existing features and applications we had to keep the concepts of "Page"
and "Space" in XWiki while adapting them to emulate the Nested Pages feature. Here's what we've done to achieve this by default: 

  • We've hidden the parent-child feature
    Information

    Even though it's hidden you can still turn it back on if you need it while you migrate your content to use Nested Spaces: set the core.hierarchyMode property to parentchild in the xwiki.properties configuration file.

  • When creating a new page, the system automatically creates Page.WebHome, which creates a Space, though this is hidden in the URL (you only see .../Page/) 
  • For advanced users, we added the ability to create "Terminal Pages" which are pages that are not Spaces (as before). This is meant mostly for Application creators.

Get Connected