XWiki Syntax Guide
Редактировал(а) atsarkov 20.03.2025 15:03
XWiki Syntax 1.0 » Editing » Links
XWiki Syntax 1.0: Links
1.0 Links
Feature | XWiki Syntax 1.0 | Result |
---|---|---|
Link to a page in the current Space | [WebHome] | Web Home |
Link with a label | [label>WebHome] | label |
Link with XWiki Syntax in the label | <a href="$xwiki.getURL("WebHome")"><strong>bold label</strong></a> | bold label |
Link to a page with the space specified | [Main.WebHome] | Web Home |
Link to a subwiki | [subwiki:Main.WebHome] | Web Home |
Link that opens in a new window | [label>WebHome>_blank] | label |
Link to a URL directly in the text | This is a URL: https://xwiki.org | This is a URL: https://xwiki.org |
Link to a URL | [https://xwiki.org] | https://xwiki.org |
Link to a URL with a label | [XWiki>https://xwiki.org] | XWiki |
Link to an email address | [john@smith.net>mailto:john@smith.net] | john@smith.net |
Image Link | <a href="$xwiki.getURL("Space1.Page1")">{image:img.png|document=Space2.Page2}</a> | ![]() |
Image Link with image parameters | <a href="$xwiki.getURL("Space1.Page1")">{image:img.png|document=Space2.Page2|width=26|height=26}</a> | ![]() |
Link to an attachment on the current page |
| |
Link to an attachment in a different page |
| |
Link to an Anchor in a page | [label>Space.Page#anchor] | label |
Link to a Heading in a page | [label>Space.Page#HMyheading] | label |
XWiki Syntax 1.0 Link Specification
The full format of a link is [label {> or |}] (resource) [@interWikiAlias] [{> or |} target]
- label: An optional string which will be displayed to the user as the link name when rendered. Example: My Page
- resource: The full link reference using the following syntax: (reference) [?queryString] [#anchor]
- reference: The link reference. This can be either
- A URI in the form protocol:path (examples: http://xwiki.org, mailto:john@smith.com), or
- A wiki page reference in the form [[wikiName:] spaceNameList.] (pageName). Examples: WebHome, Main.WebHome, mywiki:Main.WebHome
- wikiName: An optional string containing the name of a wiki. The link will point to a page inside that wiki. Example: mywiki
- spaceNameList: An optional dot-separated list of wiki Space names. If no space is specified the current space is used. Examples: Main, A.B, A.B.C
- pageName: A required string containing the name of the linked wiki page. Example: WebHome
- queryString: An optional query string for specifying parameters that will be used in the rendered URL. Example: mydata1=5&mydata2=Hello
- anchor: An optional anchor name pointing to an anchor defined in the referenced link. Note that in XWiki anchors are automatically created for headings. Example: HTableOfContents
- reference: The link reference. This can be either
- interWikiAlias: An optional Inter Wiki alias as defined in the InterWiki Map (see the Admin Guide). This is only valid for wiki page names. Example: wikipedia
- target: An optional string corresponding to the Hhttps://TML target attribute for a HTML A link element. This element is used when rendering the link. It defaults to opening the link in the current window. Examples: _self, _blank