XWiki Syntax Guide
XWiki Syntax 2.1 » Editing » Links
XWiki Syntax 2.1: Links
2.1 Links
XWiki Syntax 2.1 Link Specification
The full format of a link is [label>>] (resource) [||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: A required string with the link reference in one of the following forms
- URL: Any URL in the form of [url:] (protocol://path). Examples: http://xwiki.org, url:https://svn.xwiki.org/
- url: An optional string identifying the resource as an URL.
- Wiki page name reference in the form [doc:] [[wikiName:] space.] (page). Examples: WebHome, Main.WebHome, mywiki:Main.WebHome
- doc: An optional string identifying the resource as an XWiki document.
- wikiName: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: mywiki
- space: An optional wiki Space name. If no space is specified the current space is used. Example: Main
- page: A required string containing the name of the linked wiki page. Example: WebHome
- InterWiki page name reference in the form interwiki: (interWikiAlias:) (page). Example: interwiki:wikipedia:XWiki
- interwiki: A required string identifying the resource as an InterWiki link.
- interWikiAlias: An optional Inter Wiki alias as defined in the InterWiki Map (see the Admin Guide). Example: wikipedia
- page: A required string containing the name of the linked page. Example: XWiki
- 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 document that holds the attachment, see "Wiki page name" 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
- Relative path reference on the server in the form path: (relPath). Example: path:$doc.getURL('reset') produces target address http://server.domain.com/xwiki/bin/reset/Space/Page where /xwiki/bin/reset/Space/Page is produced by $doc.getURL('reset').
- path: A required string identifying the resource as a relative path.
- relPath: A required string containing the relative path of the resource on the server that shall be linked.
- UNC (Windows Explorer) reference in the form unc: (path). The link is rendered as a file:// link. Examples: unc:C:\Windows\, unc:\\myserver\path\img.png, unc:home/user/somefile
- unc: A required string identifying the resource as a UNC (Windows Explorer) path.
- path: A required string containing the local path of resource accessible by the user. Examples: C:\Windows\, \\myserver\path\img.png, home/user/somefile
- URL: Any URL in the form of [url:] (protocol://path). Examples: http://xwiki.org, url:https://svn.xwiki.org/
- parameters: An optional list of space-separated parameters passed to the link. Example: queryString="mydata1=5&mydata2=Hello" anchor="HTableOfContents" rel="__blank"
- queryString: An optional query string for specifying parameters that will be appended to the link target address and used in the rendered URL. Example: url:http://domain.com/path||queryString="mydata1=5&mydata2=Hello" produces target address http://domain.com/path?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: url:http://domain.com/path||anchor="HTableOfContents" produces target address http://domain.com/path#HTableOfContents
- rel: An optional parameter that allows to open link target in new window. Example: rel="__blank"