XWiki Syntax Guide
Last modified by Андрей Калиновский on 2022/04/28 13:59
XWiki Syntax 2.0 » Editing » Links
XWiki Syntax 2.0: Links
2.0 Links
Feature | XWiki Syntax 2.0 | Result |
---|---|---|
Link to a page in the current Space | [[WebHome]] | XWiki |
Link with a label | [[label>>WebHome]] | label |
Link with XWiki Syntax in the label | [[**bold label**>>WebHome]] | bold label |
Link to a page with the space specified | [[Main.WebHome]] | Main |
Link to a subwiki | [[subwiki:Main.WebHome]] | Main |
Link that opens in a new window | [[label>>WebHome||target="_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 | [[image:Space2.Page2@img.png>>Space1.Page1]] | ![]() |
Image Link with image parameters | [[[[image:Space2.Page2@img.png||width="26" height="26"]]>>Space1.Page1]] | ![]() |
Link to an attachment on the current page | [[text>>attach:img.png]] | |
Link to an attachment in a different page | [[text>>attach:Space.Page@img.png]] | |
Link to an Anchor in a page | [[label>>Space.Page#anchor]] | label |
Link to a Heading in a page | [[label>>Space.Page#HMyheading]] | label |
Link to an Anchor in the current page | [[label>>#anchor]] | label |
XWiki Syntax 2.0 Link Specification
The full format of a link is [label>>] (resource) [@interWikiAlias] [||parameters]
- label: An optional string which will be displayed to the user as the link name when rendered. The label may contain XWiki Syntax. If no label is specified a default label will be generated. The generation pattern can be changed, see the Admin Guide. Example: My Page
- resource: The full link reference using the following syntax: (reference) [?queryString] [#anchor]
- reference: The link reference in one of the following forms:
- URL: Any URL in the form of protocol://path. Examples: http://xwiki.org, https://svn.xwiki.org/
- 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
- Attachment reference in the form attach: [wikiPageName@] (attachmentName). Examples: attach:img.png, attach:mywiki:Main.WebHome@img.png
- attach: A required string identifying the resource as attachment.
- wikiPageName: An optional string referencing the page that holds the attachment, see "Wiki page" above.
- attachmentName: Name of the attachment as it is stored in the wiki.
- Email address in the form mailto: (emailAddress) (#anchor is not valid). Example: mailto:john@smith.com
- mailto: A required string identifying the resource as email.
- emailAddress: Targeted email address. Example: "john@smith.com"
- 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 in one of the following forms:
- 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
- parameters: An optional list of parameters passed to the link. Example: target="_blank" (open in new window)