How can I get the reference of a page?

Last modified by Thomas Mortagne on 2023/10/10

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:

  • Go to the Information Tab at the bottom of the 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.

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