Wiki source code of Page Linking and References

Last modified by superadmin on 2026/10/14 18:26

Show last authors
1 Pages can be linked using different syntaxes or editors.
2
3 == Internal Links ==
4
5 An internal link is a link created using a [[Page reference>>||anchor="HPageReferences"]] to point to another Page in the wiki. They can be tracked as [[backlinks>>||anchor="HBacklinks"]] and can be automatically updated when the target Page is [[moved/renamed>>documentation.xs.user.base.page.operations-refactor.move-rename.WebHome]].
6
7 {{image reference="internal-link.png" size="large" alt="Internal link highlighted in text content"/}}
8
9 == External Links ==
10
11 An external link is any link that uses a direct URL (e.g., direct URLs, bookmarks, links shared from outside the wiki). They are not affected by Page [[move/rename>>documentation.xs.user.base.page.operations-refactor.move-rename.WebHome]]. External links can be easily identified by the small icon displayed next to the link, as shown below:
12
13 {{image reference="external-link-icon.png" size="large" alt="External link icon displayed next to a link"/}}
14
15 == Page References ==
16
17 A Page reference uniquely identifies a Page by its location within the wiki structure: it is the path leading to that Page, through the wiki it belongs to and its parent Pages.
18
19 Page references are commonly used:
20
21 * As values of macro parameters that expect a page reference (for example, the [[Include macro's>>extensions:Extension.Include Macro||anchor="HParametersdefinition"]] ##reference## parameter);
22 * When calling script APIs that operate on Pages.
23
24 A Page reference has two forms, which differ by whether the wiki is part of the path:
25
26 |=Form|=Written as|=Example
27 |Relative to the wiki|The parent Pages and the Page, separated by a ##.##|##News.Announcements.WebHome##
28 |Global|The wiki, a ##:##, then the relative form|##xwiki:News.Announcements.WebHome##
29
30 Use the relative form for a Page of the same wiki, and the global form for a Page of another wiki of the same [[Wiki farm>>documentation.xs.user.base.wikis.WebHome]].
31
32 The [["Information" tab>>Documentation.UserGuide.Features.DocumentLifecycle.WebHome||anchor="HInformation"]] displays the relative form by default:
33
34 {{image reference="page-references.png" size="large" alt="The Page reference field of the Information tab, showing a reference relative to the wiki"/}}
35
36 You can:
37
38 * Use the button on the left to switch the displayed reference between its relative and its global form;
39 * Use the button on the right to copy the displayed reference to the clipboard.
40
41 Switching the same Page reference to its global form adds the wiki in front of it:
42
43 {{image reference="page-references-global.png" size="large" alt="The Page reference field of the Information tab, showing a global reference prefixed by the wiki name"/}}
44
45
46 == Backlinks ==
47
48 Backlinks represent the inverse relationship of links: they indicate which Pages contain links pointing to a given Page. Backlinks are discovered and maintained through internal mechanisms such as [[link indexing>>documentation.xs.user.base.page.linking-references.link-indexing.WebHome]], and they are only available for links that XWiki can interpret (internal links using [[XWiki syntax>>Documentation.UserGuide.Features.XWikiSyntax.WebHome||anchor="HLinks"]]). You can view the backlinks of a Page in theĀ [["Information" tab>>Documentation.UserGuide.Features.DocumentLifecycle.WebHome||anchor="HInformation"]].

Get Connected