How can I get the reference of a page?

Version 4.2 by Vincent Massol on 2017/07/17

You might need to know the reference of a page. For example this is needed to use some macro that take a reference as parameter (such as the Include Macro or the Display Macro), or simply to create a link to a page.

There are several ways:

  • (Future). When XWIKI-13362 is implemented you'll be able to get the info from the Ïnformation tab of any page.
  • Understand the Standard URL Format and derive the reference from the URL, specifically for the view action.
  • Edit the page you wish to reference using the wiki editor, add the following {{velocity}}$doc.documentReference{{/velocity}} and press "Preview" (so that the page isn't saved) and check what's displayed.
Information

If you're wondering why some guides mention Spaces while you only see Pages in the UI, it's because at the level of the XWiki internals (the model), XWiki uses the concept of Spaces. However to make it simpler for users and since we introduced the concept of Nested Pages we're only showing Pages in the UI, simulating Nested Pages using Spaces.

Get Connected