XWiki Syntax Guide

Last modified by Administrator on 2021/07/06 18:37

FeatureXWiki Syntax 2.1Result
Absolute link to page PageB located in PageA[[PageA.PageB]]PageB
Relative link to page PageA from the current page[[PageA]] or [[.PageA]]PageA
Relative link to page PageB in PageA from the current page[[.PageA.PageB]]PageB
Link with a label
[[label>>PageA]]

XWiki Syntax is supported inside link labels.

label
Link with wiki syntax in the label[[**bold label**>>PageA]]bold label
Link on an image[[image:PageA@img.png>>PageA]]img.png
Absolute link to page PageB located in PageA in wiki WikiA[[WikiA:PageA.PageB]]PageB
Link that opens in a new window[[PageA||target="_blank"]]PageA
Implicit link to a URLThis is a URL: http://xwiki.orgThis is a URL: http://xwiki.org
Explicit link to a URL[[http://xwiki.org]]http://xwiki.org
Explicit link to a URL with a label[[XWiki>>http://xwiki.org]]XWiki
Link to an email address[[john@smith.net>>mailto:john@smith.net]]john@smith.net
Link to an attachment on the current page[[attach:img.png]]img.png
Link to an attachment in a different page[[attach:PageA.PageB@img.png]]img.png
Link to an Anchor in a page[[PageA.PageB||anchor="anchor"]]PageB
Link to a Heading in a page
[[PageA.PageB||anchor="HMyheading"]]

When you add a Heading, an anchor named "H" followed by the heading title with only alpha characters is created. For example, for a Heading named "My heading", the generated anchor will be "HMyheading".

PageB
Link to an anchor in the current page[[label>>||anchor="anchor"]]label
Link to a page with a query string[[PageA.PageB||queryString="param1=value1&param2=value2"]]PageB
Link to the current page with a query string[[label>>||queryString="param1=value1&param2=value2"]]label

XWiki Syntax 2.1 Link Specification

The part in ( ) is required, while the parts in [ ] are optional.

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 Since 10.6 reference in the form (page: ) [wikiName:] (pageNameList). Examples: page:Page, page:myxwiki:Page, page:ParentPage.ChildPage.SubChildPage, page:../SiblingPage, page:./ChildPage
      • page: A required string identifying the resource as an XWiki page. The same reference can be use for either a terminal or non-terminal page, both both exist it will lead to the non-terminal page.
      • wikiName: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. If no wiki is specified, the current wiki is used. Example: mywiki
      • pageNameList: A required list of slash-separated wiki Pages names pointing to the final linked wiki Page syntax. It's also possible to us . and .. to indicate current or parent page/wiki. Examples: Main, A/B, A/B/C, ../Sibling, ./Child
    • Wiki document reference in the form (doc: ) [[wikiName:] spaceNameList.] (documentName). Examples: doc:Welcome, doc:Main.Welcome, doc:mywiki:Main.Welcome
      • doc: A required string identifying the resource as an XWiki terminal page. A non-terminal page can also be referenced this way, but it must append its .WebHome part (e.g. doc:Sandbox.WebHome).
      • wikiName: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. If no wiki is specified, the current wiki is used. 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
      • documentName: A required string containing the name of the linked wiki page. Example: Welcome
    • Wiki space Since 7.4.1 reference in the form (space: ) [wikiName:] (spaceNameList). Examples: space:Main, space:mywiki:Main, space:A.B.C
      • space: A required string identifying the resource as an XWiki non-terminal page (i.e. a space).
      • wikiName: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. If no wiki is specified, the current wiki is used. Example: mywiki
      • spaceNameList: A required list of dot-separated wiki Space names pointing to the final linked wiki Space (or non-terminal page). Examples: Main, A.B, A.B.C
    • InterWiki page reference in the form interwiki: (interWikiAlias: ) (pageName). 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
      • pageName: 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:mywiki:Main@img.png
      • attach: A required string identifying the resource as attachment.
      • wikiPageName: An optional string referencing the (terminal or non-terminal) page that holds the attachment. This is resolved identically to "Untyped", below.
      • attachmentName: Name of the attachment as it is stored in the wiki. Example: photo.png
    • 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
    • Untyped: If none of the above mentioned resource types are specified (i.e. no type: resource prefix was specified in the link), then the link will be treated as a link to an XWiki terminal or non-terminal page using the following algorithm:
      • Terminal page in the current space, only if it exists. Example: [[A]] is resolved to the equivalent of [[doc:currentSpace.A]]
      • Non-terminal page Since 7.4.1 in the current space. Example: [[A]] is resolved to the equivalent of [[space:currentSpace.A]], which is the equivalent of [[doc:currentSpace.A.WebHome]]
      • If the current page is non-terminal and the previous 2 checks above did not find an existing page, 2 additional checks are made:
        • Terminal page Since 7.4.1 as sibling in the parent space, only if it exists. Example: The [[B]] link inside the non-terminal page A.C is resolved to the equivalent of [[doc:A.B]]
        • Non-terminal page Since 7.4.1 as sibling in the parent space, regardless if it exists or not. Example: The [[B]] link inside the non-terminal page A.C is resolved to the equivalent of [[space:A.B]], which is the equivalent of [[doc:A.B.WebHome]]
      • Note1 - Absolute links: Since 7.4.1 If the untyped link has 2 or more dot-separated components specified (i.e. that look like a space name and a page name), the above algorithm will resolve the page relative to the current wiki, and not the current space. Example: [[A.B]] can be resolved to either [[doc:currentWiki:A.B]] (if it exists) or to [[space:currentWiki:A.B]] (equivalent of [[doc:currentWiki:A.B.WebHome]]) and not to [[doc:currentWiki:currentSpace.A.B]] or [[doc:currentWiki:currentSpace.A.B.WebHome]].
      • Note2 - Special handling of .WebHome: Since 7.4.1 If the untyped link ends in .WebHome, it will always be handled as a terminal page. Example: [[A.WebHome]] will always be resolved to the equivalent of [[doc:A.WebHome]] and not to [[doc:A.WebHome.WebHome]].
  • parameters: An optional list of space-separated parameters passed to the link. Example: queryString="mydata1=5&mydata2=Hello" anchor="HTableOfContents" target="_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
    • target: An optional parameter that allows to open link target in new window. Example: target="_blank"
Tags:
Created by Administrator on 2021/07/06 18:37
  

Schools

AbleTwoShine (CA)
Academy Of Classical Christian Studies (OK)
Acton Boxborough (MA)
Advanced Technologies (NV)
Albuquerque Academy (NM)
Alexander W Dreyfoos School Of The Arts (FL)
American (CA)
American Heritage Boca Delray (FL)
American Heritage Broward (FL)
Amplus Academy (NV)
Apple Valley (MN)
Appleton North (WI)
Aragon (CA)
Archbishop Mitty (CA)
Ardrey Kell (NC)
Ardsley (NY)
Arizona College Prep (AZ)
Astor Redhead Academy (CA)
Athenian (CA)
Auburn (AL)
Ayala (CA)
Bagel Academy (AL)
Bartlesville (OK)
BASIS Independent Silicon Valley (AL)
BASIS Peoria (AZ)
Basis Shavano (TX)
Beckman (CA)
Bellarmine (CA)
Bentonville West (AR)
Bergen County (NJ)
Bergen County Debate Club (NJ)
Bishops (CA)
Blue Springs South (MO)
Blue Valley (KS)
Boise Senior (ID)
Borah Senior (ID)
Brentwood School (CA)
Bridgeland (TX)
Bronx Science (NY)
Brookfield East (WI)
Brookline (MA)
Brophy College Prep (AZ)
Buhler (KS)
Burbank Senior (CA)
Byram Hills (NY)
Byron Nelson (TX)
Cabot (AR)
Caddo Magnet (LA)
Canyon Crest (CA)
Cardinal Gibbons (FL)
Carmel (IN)
Carmel Valley Independent (CA)
Carnegie Vanguard (TX)
Carrollwood Day (FL)
Cary Academy (NC)
Cassville (MO)
Catonsville (MD)
Central Valley (WA)
Century (ID)
Challenge Early College (TX)
Chaminade (NY)
Champion (TX)
Charlotte Latin School (NC)
Chattahoochee (GA)
Chelmsford (MA)
Cheyenne East (WY)
Christmas Independent (NY)
Christopher Columbus (FL)
Claudia Taylor Johnson (TX)
Clear Brook (TX)
Clear Lake (TX)
Clear Springs (TX)
Clements (TX)
Cogito Debate (CA)
College Park (TX)
Cooper City (FL)
Coppell (TX)
Crean Lutheran (CA)
Cupertino (CA)
Cypress Bay (FL)
Cypress Falls (TX)
Cypress Independent (TX)
Cypress Woods (TX)
Decatur (GA)
Denver East (CO)
Diamond Bar (CA)
Dougherty Valley (CA)
Dr Phillips (FL)
Dripping Springs (TX)
DSST Byers (CO)
DTHS (LA)
Dublin (CA)
Dulles (TX)
Durango (CO)
Durham Academy (NC)
Dwight Englewood (NJ)
Eagan (MN)
Eden Prairie (MN)
Edgemont (NY)
Edina (MN)
Edmond North (OK)
Elkins (TX)
Evergreen Valley (CA)
Fairmont Prep (CA)
Fairview (CO)
Flintridge Prep (CA)
Flower Mound (TX)
Fort Lauderdale (FL)
Freehold Township (NJ)
Fremont (CA)
Fullerton Union (CA)
Garland (TX)
Geffen (CA)
George Washington (CO)
Golden State Academy (CA)
Grapevine (TX)
Green River (WY)
Greenhill (TX)
Guyer (TX)
H S Two (CA)
Hamilton (AZ)
Harker (CA)
Harrison (NY)
Harvard Westlake (CA)
Hawken (OH)
Hebron (TX)
Heights (TX)
Hempstead (IA)
Highland (ID)
Holy Cross (LA)
Holy Ghost (PA)
Homestead (WI)
Honor (CA)
Houston Memorial (TX)
Hunter College (NY)
Immaculate Heart (CA)
Indian Springs (AL)
Interlake (WA)
Iowa City West (IA)
Irma Rangel YWLS (TX)
Irvington (CA)
Isidore Newman (LA)
Jackson (WY)
James Bowie (TX)
James Logan (CA)
Jenks (OK)
Jordan (TX)
Joshi Plat (MN)
Keller (TX)
Kelly Walsh (WY)
Kenston (OH)
Kent Denver (CO)
King (FL)
La Salle College (PA)
Lake Highland (FL)
Lake Oswego Senior (OR)
Lakeville (MN)
Lander Valley (WY)
Langham Creek (TX)
Lassiter (GA)
LC Anderson (TX)
LD Bell (TX)
Leland (CA)
Lexington (MA)
LHP (FL)
Liberty (OH)
Lincoln (OR)
Lincoln East (NE)
Lincoln North Star (NE)
Lincoln Southeast (NE)
Lincoln Southwest (NE)
Little Rock Central (AR)
Littleton (CO)
Livingston (NJ)
LNU (CA)
Los Altos (CA)
Lovejoy (TX)
Loveless Academic Magnet Program (AL)
Loyola (CA)
Loyola Blakefield (MD)
Lubbock (TX)
Lynbrook (CA)
Mahtomedi (MN)
Marcus (TX)
Marlboro (NJ)
Marlborough (CA)
Marquette University (WI)
Martin Luther King (CA)
Martinsburg (WV)
McDowell (PA)
McMillen (TX)
McNeil (TX)
Mercer Island (WA)
Midlothian (TX)
Midtown (GA)
Millard North (NE)
Millard South (NE)
Millburn (NJ)
Milpitas (CA)
Milton Academy (MA)
Minnetonka (MN)
Mission San Jose (CA)
Mission Vista (CA)
ModernBrain (CA)
Monta Vista (CA)
Montgomery (NJ)
Montgomery Academy (AL)
Montville (NJ)
MOORE (OK)
Mount Pleasant (TX)
Mount Vernon (WA)
Mountain House (CA)
Mountain View (AZ)
Nashua South (NH)
Needham (MA)
Neenah (WI)
New Trier (IL)
Newark Science (NJ)
Newman Smith (TX)
Newport (WA)
Newtown (CT)
North Allegheny (PA)
North Mecklenburg (NC)
Northern Valley (NJ)
Northland Christian (TX)
Northview (GA)
Northwood (CA)
Notre Dame San Jose (CA)
Nova Academy (CA)
NSU (FL)
NSU University School (FL)
OA Independent (CA)
Oak Ridge (CA)
Ogando Independent (XX)
Olathe East (KS)
Olympia (FL)
Omaha Central (NE)
Orange County School Of The Arts (CA)
Orange Lutheran (CA)
Oregon Episcopal School (OR)
Oxford (CA)
Park City (UT)
Parkway (LA)
Pasadena (TX)
Peachtree Ridge (GA)
Peninsula (CA)
Perry (AZ)
Phillips Exeter (NH)
Pine View (FL)
Plano East (TX)
Plano Independent (TX)
Plano West (TX)
Pocatello (ID)
Portola (CA)
Presentation (CA)
Princeton (NJ)
Proof (CA)
Prospect (CA)
Providence (NC)
Ramsay (AL)
Redlands (CA)
Ridge (NJ)
Ridge Point (TX)
Riverwood (GA)
Rock Springs (WY)
Roeper School (MI)
Rosemount (MN)
Round Rock (TX)
Royse City (TX)
Sage (CA)
Salado (TX)
Sam Barlow (OR)
Sammamish (WA)
San Angelo Central (TX)
San Mateo (CA)
Sandra Day Oconnor Independent (TX)
Saratoga (CA)
Scarsdale (NY)
Scripps Ranch (CA)
Sequoia (CA)
Sequoyah (GA)
Seven Lakes (TX)
Sharon (MA)
Shawnee Mission South (KS)
Sidwell (DC)
Silver Creek (CA)
Sky View (UT)
SLC West (UT)
Solebury (PA)
South Eugene (OR)
Southlake Carroll (TX)
Springfield Catholic (MO)
St Agnes (TX)
St Croix Prep (MN)
St Josephs (WV)
St Michael Albertville (MN)
St Thomas Aquinas (KS)
Stanford OHS (CA)
Stockdale (CA)
Strake Jesuit (TX)
Stratford (TX)
Strath Haven (PA)
Stuyvesant (NY)
Summit (NJ)
Syosset (NY)
Taft (CA)
Taravella (FL)
Tays (TX)
Tempe Prep (AZ)
Test School (AL)
Teurlings Catholic (LA)
Texas Academy Of Mathematics And Science (TX)
The Meadows (NV)
The Woodlands (TX)
Thomas Jefferson (VA)
Thunder Basin (WY)
Tom Glenn (TX)
Traber Robinson McLoughlin (MN)
Trinity Prep (FL)
Troy (CA)
Troy Independent (CA)
Tuloso Midway (TX)
Union (OK)
Unionville (PA)
University (CA)
Valley (IA)
Valley International (CA)
Valor Christian (CO)
Vandegrift (TX)
Verona Area (WI)
Vestavia Hills (AL)
Village (TX)
Walt Whitman (MD)
Wenatchee (WA)
West Broward (FL)
West Des Moines Valley (IA)
West Ranch (CA)
West Windsor Plainsboro North (NJ)
Westford (MA)
Westlake (TX)
Weston Erdmann (MN)
Westridge School (CA)
Westside (TX)
Westwood (TX)
Wichita East (KS)
William B Travis (TX)
William G Enloe (NC)
William P Clements (TX)
William Walker Indepedent (TX)
William Walker Independent (TX)
Wilson (DC)
Windward (CA)
Winston Churchill (TX)
Wyoming Virtual Academy (WY)
Yerba Buena (CA)
Yorktown (VA)
Youth Voices (IL)