XWiki Syntax Guide
Last modified by Frank Fock on 2024/02/07 14:48
XWiki Syntax 2.1 ยป Programming
XWiki Syntax 2.1: Programming
Macros
2.0 Macros
There is only one kind of macro in XWiki Syntax 2.1, which is called by the syntax: {{macroname param1="value1" ... paramN="valueN"}}...{{/macroname}}. For macros without content there's a short notation: {{macroname param1="value1" ... paramN="valueN"/}}
Feature | XWiki Syntax 2.1 | Result |
---|---|---|
Rendering Macro with a content | {{code language="java"}} System.out.println("Hello World!"); {{/code}} | System.out.println("Hello World!"); |
Rendering Macro without content | {{include reference="Space.Page"/}} | The referenced page is included in the current page |
Macros in this wiki
Id | Name | Categories | Description | Visibility |
---|---|---|---|---|
activity | Activity (legacy) | Notifications | Provide a macro implemented with the Notifications Application to keep a backward compatibility with Activity Stream. | Current Wiki |
anchor | Anchor Macro | Confluence Anchor macro bridge to the XWiki Id macro | Current Wiki | |
async | Async macro | Content | Execute asynchronously and/or cache the macro content. | Global |
attachmentGalleryPicker | Attachment Picker | Development | Grid based attachment picker. | Global |
attachmentSelector | Attachment Selector | Development | A control to be used for object properties of the current page that are supposed to contain the name of an attachment from the current (or target) page. Allows uploading new attachments, and deleting attachments from the target page. If no target page is specified, the current page will be used. Object properties are only saved to the current page. | Current Wiki |
box | Box | Formatting | Draw a box around provided content. | Global |
button | Button Macro | Insert a noticeable, clickable button on your XWiki page to highlight links and create call to actions! | Current Wiki | |
cache | Cache | Development | Caches content. | Global |
chart | Chart | Content | Displays a graphical chart generated from miscellaneous data sources | Global |
children | Children | Navigation | Displays a tree of children pages of the current page | Current Wiki |
code | Code | Formatting | Highlights code snippets of various programming languages | Global |
column | Column Macro | Add the column macro to a page to organize your content in columns. This macro is used in conjunction with the Section macro, and provides more flexibility than page layouts. | Current Wiki | |
comment | Comment | Development | Allows putting comments in the source content. This macro doesn't output anything. | Global |
confluence_attachments | Attachments | Confluence attachment macro support for XWiki | Current Wiki | |
confluence_children | Children Pages | A wrapper for the document tree macro that supports confluence parameter names. | Current Wiki | |
confluence_gallery | Confluence Gallery | content | Bridge for the Confluence gallery macro. | Current Wiki |
container | Container | Layout | A macro to enclose multiple groups and add decoration, such as layout. | Global |
content | Content | Content | Allows writing content in any wiki markup | Global |
content-report-table | Content Report Table Macro | content | Provides a content report in table format, based on labels. | Current Wiki |
context | Context | Development | Executes content in the context of the passed page | Global |
contributors | Contributors | Contributors Confluence Bridge macro to show the contributors of a given document. | Current Wiki | |
dashboard | Dashboard | Layout | A macro to define a dashboard to fill with gadgets. | Global |
diagram | Diagram | Content | Displays a diagram. | Current Wiki |
display | Display | Content | Display other pages into the current page. | Global |
displayIcon | Icon | Content | Display an icon. | Global |
documents | Pages | Content | Displays a list of pages in a Livetable | Current Wiki |
documentTree | Page Tree | Navigation | Displays the tree of XWiki pages. | Current Wiki |
drawio | Drawio | Bridge between the Confluence Drawio macro and the XWiki Diagram macro. By default it displays the PNG file used by Drawio to preview the diagram. The user has the option to convert the Drawio diagram into an XWiki Diagram for being able to modify it. | Current Wiki | |
error | Error Message | Formatting | Displays an error message note. | Global |
example | Example | Formatting | Shows an example and its source code. | Current Wiki |
excerpt | Excerpt | content | Bridge for the Confluence Excerpt macro. It marks part of the page's content for use by other macros. | Current Wiki |
excerpt-include | Excerpt include | Bridge for the Confluence Excerpt Include macro, includes excerpts from other document. | Current Wiki | |
expand | Expand | Add the Expand macro to your page to provide content in an expandable / collapsible section. This is one of Confluence's most popular macros. It's great for: visually reducing the amount of information on a page, breaking process information down into clickable steps, hiding background or obsolete information, while still keeping it on the page for future reference. The macro is collapsed by default, people need to click each one to expand it. There's no way to expand all macros on a page at once, however all Expand macros are automatically expanded when you print or export the page to PDF. | Current Wiki | |
footnote | Footnote | Content | Generates a footnote to display at the end of the page. | Global |
gallery | Gallery | Layout | Displays the images found in the provided content using a slide-show view. | Global |
gliffy | Gliffy | Bridge between the Confluence Gliffy macro and the XWiki Diagram macro. By default it displays the PNG file used by Gliffy to preview the diagram. The user has the option to convert the Gliffy diagram into an XWiki Diagram for being able to modify it. | Current Wiki | |
groovy | Groovy | Development | Execute a groovy script. | Global |
html | HTML | Development | Inserts HTML or XHTML code into the page. | Global |
iconPicker | Icon Picker | Development | Select an icon within the XWiki icon set. | Current Wiki |
id | Id | Navigation | Allows putting a reference/location in a page. In HTML for example this is called an Anchor. It allows pointing to that location, for example in links. | Global |
include | Include | Content | Include other pages into the current page. | Global |
info | Info Message | Formatting | Displays an info message note. | Global |
jwplayer | JW Player | Content | The JW Player is an open-source embeddable media player for web sites, supporting many commonly-used audio and video formats. The player is easy to configure, customize and extend. | Current Wiki |
layout | Layout Macro | content | Confluence bridge macro to define a layout, containing layout sections (using the layout-section macro). | Current Wiki |
layout-cell | Layout Cell Macro | content | Confluence bridge macro used for defining a part a layout section, used inside the layout-section macro. | Current Wiki |
layout-section | Layout Section Macro | content | Confluence bridge macro to define a section of a layout, used inside the layout macro and containing layout cells. | Current Wiki |
liveData | Live Data | Content | Display dynamic lists of data. | Global |
locationSearch | Location Search | Search in the given location. | Current Wiki | |
mathblock | Math Block | Confluence bridge macro for LaTeX math blocks. | Current Wiki | |
mathblock-ref | Math Block Reference | Confluence bridge macro to reference math blocks. | Current Wiki | |
mathinline | Math Inline | Confluence bridge macro for LaTeX math inline expressions. | Current Wiki | |
mathjax | MathJax | content | Current Wiki | |
mention | User Mention | Notifications | Insert a user mention. | Current Wiki |
menu | Menu | Navigation | Displays a menu created using simple wiki syntax (nested lists and links). | Global |
messageSender | Message Sender | Social | A control that allows users to enter messages that are handled by the MessageStream module. | Current Wiki |
missingLicenseMessage | Missing License Message | Display an error message when the extension does not have a valid license. | Global | |
mockup | Mockup | Bridge for the Confluence Balsamiq macro. It only displays the image preview of the mockup. | Current Wiki | |
msStream | Microsoft Stream | Content | Embed a Microsoft Stream video in a page by simply passing the URL and any customization parameters. | Current Wiki |
multimedia | Multimedia Macro | Bridge for the Confluence Multimedia macro. | Current Wiki | |
net-presago-stream-macro | Microsoft Stream Confluence Bridge | Content | Bridge for the Confluence Microsoft Stream Macro. | |
note | Note | Add a Note macro to your page to make important information stand out. The macro is used to format your text in a colored panel. | Global | |
notifications | Notifications | Notifications | Display notifications about events happened on the wiki. | Current Wiki |
notificationsApplicationsPreferences | Notifications Applications Preferences | Notifications | Display the preferences of the current user about notification applications. | Current Wiki |
notificationsAutoWatchPreferences | Notifications Auto Watch Preferences | Notifications | Display the preferences of the current user about auto watched pages. | Current Wiki |
notificationsCustomFiltersPreferences | Notifications Custom Filters Preferences | Notifications | Display the preferences of the given user about custom notification filters. | Current Wiki |
notificationsEmailPreferences | Notifications Email Preferences | Notifications | Display the preferences of the current user about notification emails. | Current Wiki |
notificationsFiltersPreferences | Notifications Filters Preferences (deprecated) | Notifications | Display the preferences of the current user about notification filters. This macro is now deprecated in favor of Custom Notifications Filters Preferences or System Notifications Filters Preferences. | Current Wiki |
notificationsSystemFiltersPreferences | Notifications System Filters Preferences | Notifications | Display the preferences of the given user about system notification filters. | Current Wiki |
office | Office Document Viewer | Content | View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or importing them. | Global |
pagetree | Page Tree (Confluence bridge) | Bridge for the Confluence Page Tree macro. | Current Wiki | |
panel | Panel Macro | content | Panel macro to display XWiki content inside a panel. | Current Wiki |
paste-code-macro | Paste Code Macro | Bridge between the Confluence Paste Code macro and the XWiki Code macro. | Current Wiki | |
pdftoc | PDF Table of Contents | Internal | Generates the table of contents for the PDF export. | Global |
pdfviewer | PDF Viewer | PDF Viewer based on Mozilla pdf.js | Global | |
profile-picture | Profile Picture | Confluence Profile Picture macro | Current Wiki | |
putFootnotes | Put Footnotes | Content | Displays all the footnotes from the page. If missing, all footnotes are displayed by default at the end of the page. | Global |
python | Python | Development | Executes a python script. | Global |
recently-updated | Recently Updated | confluence | Add the Recently Updated macro to a page to show a list of pages, blogs, files, and comments that have been created or edited recently. This is great for project landing, information pages, or team space home pages. It's very flexible, you can limit the list to specific people, spaces, types of content, and more. | Current Wiki |
script | Script | Development | Execute script in provided script language. | Global |
section | Section Macro | content | Add the Section macro to a page to organize your content in sections and columns. This macro is used in conjunction with the Column macro, and provides more flexibility than page layouts. | |
spaceindex | Space Index | Deprecated | Lists the pages in a space. | Current Wiki |
spaces | Spaces | Deprecated | Displays all the spaces in this wiki. | Current Wiki |
status | Status | Insert a colored label in the text to highlight the status of an item. | Current Wiki | |
success | Success Message | Formatting | Displays a success message note. | Global |
tagcloud | Tag Cloud | Content | Displays the cloud of tags in this wiki or in the specified space, if any. | Current Wiki |
team | Team | Display avatars of the members of a team. | Current Wiki | |
template | Template | Development | Insert a template. | Global |
time | Time Macro | Confluence Time macro | Current Wiki | |
tip | Tip | Confluence Tip macro bridge to the XWiki Success macro | Current Wiki | |
toc | Table of contents | Navigation | Generates a table of contents. | Global |
translation | Translation | Content | Display a translation message. | Global |
tree | Tree | Navigation | Displays a tree hierarchy defined by the macro content or the source parameter. | Current Wiki |
uiextension | UI Extension | Development | Insert a UI extension. | Global |
uiextensions | UI Extensions | Development | Insert UI extensions. | Global |
useravatar | User Avatar | Content | Allows displaying the avatar for a specific user. | Global |
userList | User List | Displays a list of users with a customizable set of their properties | Global | |
userlister | User Lister | Confluence bridge macro to list users of groups | Current Wiki | |
userProfile | User Profile | Displays a user profile with custom properties | Global | |
velocity | Velocity | Development | Executes a Velocity script. | Global |
view-file | View Files | content | Show files using PDF Viewer Macro or Office Viewer | Current Wiki |
viewdoc | View Doc | content | View Office Word documents. | Current Wiki |
viewpdf | View Pdf | content | View Pdf documents. | Current Wiki |
viewppt | View Ppt | content | View Office Powepoint documents. | Current Wiki |
viewxls | View Xls | content | View Office Excel documents. | Current Wiki |
warning | Warning Message | Formatting | Displays a warning message note. | Global |
wikimacrocontent | WikiMacro Content | Development | Display editable content of a wikimacro. | Global |
wikimacroparameter | WikiMacro Parameter | Development | Display editable parameter of a wikimacro. | Global |
wikis | Wikis | Navigation | List all wikis | Current Wiki |
wireframe | Balsamiq Wireframe | Bridge for the Confluence Balsamiq macro. It only displays the image preview of the wireframe. | Current Wiki | |
workspaces | Workspaces (Legacy) | Deprecated | Deprecated macro that should not be used here for compatibility reasons. Please use the "wikis" macro instead. | Current Wiki |
HTML
2.0 HTML
XWiki Syntax 2.1 | Result |
---|---|
{{html}}<abbr title="HyperText Markup Language">HTML</abbr>{{/html}} | HTML |
Scripts
2.0 Scripts
Feature | XWiki Syntax 2.1 |
---|---|
Velocity script | {{velocity}} #set ($var = "whatever") {{/velocity}} |
Groovy script | {{groovy}} def var = "whatever" {{/groovy}} |