XWiki Syntax Guide

Last modified by superadmin on 2025/10/30 14:53

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"/}}

FeatureXWiki Syntax 2.1Result
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
Information

For the full list of available macros check the Extensions wiki.

Macros in this wiki

IdNameCategoriesDescriptionVisibility
activityActivity (legacy)NotificationsProvide a macro implemented with the Notifications Application to keep a backward compatibility with Activity Stream.Current Wiki
asyncAsync macroContentExecute asynchronously and/or cache the macro content.Global
attachmentGalleryPickerAttachment PickerDevelopmentGrid based attachment picker.Global
attachmentSelectorAttachment SelectorDevelopmentA 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
awmkanbanKanban board for AppWithinMinutesDisplay XWiki Documents from an AWM as a Kanban board (see https://en.wikipedia.org/wiki/Kanban_board).Global
blogpostcreateBlog Post CreateThe Blog Post Create macro is used to insert a post creation form. The macro takes a blog descriptor document as parameter. The new blog posts will belongs to the blog specified in the parameter.Current Wiki
blogPostLayoutCardsCards Blog Post LayoutThis macro is used to display a blog post using the 'Cards' layoutCurrent Wiki
blogPostLayoutCompactBlog Post Layout CompactThis macro is used to display a full blog post in a compact modeCurrent Wiki
blogPostLayoutFullBlog Post Layout FullThis macro is used to display a full blog postCurrent Wiki
blogPostLayoutImageBlog Post Layout ImageThis macro is used to display a full blog post with a thumbnail imageCurrent Wiki
blogPostLayoutLinkBlog Post Layout LinkThis macro is used to display a blog post as a simple linkCurrent Wiki
blogpostlistBlog post listThe BlogPostMacro is used to search and display blog posts based on some parameters, the results can be displayed using customizable templates.Current Wiki
blogsAll Blogs LivetableThe blogs macro is used to list on a livetable all the blog available on the wiki.Current Wiki
boxBoxFormattingDraw a box around provided content.Global
buttonButton MacroInsert a noticeable, clickable button on your XWiki page to highlight links and create call to actions!Current Wiki
cacheCacheDevelopmentCaches content.Global
chartChartContentDisplays a graphical chart generated from miscellaneous data sourcesGlobal
checkboxCheckboxContentDisplay a simple checkbox alongside some rich content.Global
childrenChildrenNavigationDisplays a tree of children pages of the current pageCurrent Wiki
codeCodeFormattingHighlights code snippets of various programming languagesGlobal
commentCommentDevelopmentAllows putting comments in the source content. This macro doesn't output anything.Global
confluence_attachmentsConfluence bridge for AttachmentsConfluenceConfluence bridge for the Attachment macroCurrent Wiki
confluence_childrenConfluence bridge for ChildrenConfluenceConfluence bridge for the Children macro using the XWiki document tree macro.Current Wiki
confluence_columnConfluence bridge for ColumnConfluenceConfluence bridge for the Column macro.Current Wiki
confluence_contentbylabelConfluence bridge for Content by labelConfluence Bridge for the Content by label macro
confluence_detailsConfluence bridge for DetailsConfluence Bridge for the Details (Page Properties) macro. It allows defining property key-value pairs in a table contained in the macro. Current Wiki
confluence_detailssummaryConfluence bridge for Details SummaryConfluence bridge for the Details Summary (Page Properties Report) macro to display properties attached to a page using the Details macro.Current Wiki
confluence_drawioConfluence bridge for DrawioConfluenceConfluence Bridge for the Drawio macro. By default it displays the PNG file used by the Drawio macro to preview the diagram. The user has the option to convert the diagram into an XWiki Diagram for being able to modify it.Current Wiki
confluence_favpagesConfluence bridge for Favorite PagesConfluenceConfluence bridge for the Favorite Pages macroCurrent Wiki
confluence_floatFloat macroConfluence bridge for the Float macro using the XWiki box macro
confluence_galleryConfluence bridge for GalleryConfluenceConfluence Bridge for the Gallery macro.Current Wiki
confluence_gliffyConfluence bridge for GliffyConfluenceConfluence Bridge for the Gliffy macro. By default it displays the PNG file used by the Gliffy macro to preview the diagram. The user has the option to convert the diagram into an XWiki Diagram for being able to modify it.Current Wiki
confluence_htmlcommentConfluence Bridge for HTML CommentConfluence Bridge for HTML Comment macro.
confluence_jirachartConfluence Jira chartContentConfluence bridge macro for jira chart.Global
confluence_layoutConfluence bridge for LayoutConfluenceConfluence bridge macro for the Layout macro to define a layout, containing layout sections (using the confluence_layout-section macro).Current Wiki
confluence_layout-cellConfluence bridge for Layout CellConfluenceConfluence bridge for the Layout Cell macro. It is used for defining a part a layout section, used inside the confluence_layout-section macro.Current Wiki
confluence_layout-sectionConfluence bridge for Layout SectionConfluenceConfluence bridge for the Layout Section macro. It is used to define a section of a layout, used inside the layout macro and containing layout cells.Current Wiki
confluence_mathblockConfluence bridge for MathblockConfluenceConfluence bridge for the Mathblock macro (LaTeX math block expressions).Current Wiki
confluence_mathblock-refConfluence bridge for Mathblock ReferenceConfluenceConfluence bridge macro for the Mathblock Reference macroCurrent Wiki
confluence_mathinlineConfluence bridge for MathinlineConfluenceConfluence bridge macro for the Mathinline macro (LaTeX math inline expressions).Current Wiki
confluence_mockupConfluence bridge for MockupConfluenceConfluence Bridge for the Balsamiq Mockup macro. It only displays the image preview of the mockup. Current Wiki
confluence_multimediaConfluence bridge for MultimediaConfluenceConfluence Bridge for the Multimedia macro.Current Wiki
confluence_noteConfluence bridge for NoteConfluenceConfluence bridge for the Note macro to the XWiki Success macroCurrent Wiki
confluence_outgoing-linksConfluence Outgoing LinksContentConfluence bridge macro for outgoing-links.Global
confluence_pagetreeConfluence bridge for Page TreeConfluenceConfluence Bridge for the Confluence Page Tree macro to the XWiki documentTree macro.Current Wiki
confluence_paste-code-macroConfluence bridge for Paste Code MacroConfluenceConfluence bridge for the Confluence Paste Code macro to the XWiki Code macroCurrent Wiki
confluence_sectionConfluence bridge for SectionConfluenceConfluence bridge for the Section macro
confluence_timeConfluence bridge for TimeConfluenceConfluence bridge for the Time macroCurrent Wiki
confluence_tipConfluence bridge for TipConfluenceConfluence bridge for the Tip macro to the XWiki Success macroCurrent Wiki
confluence_toc-zoneConfluence Toc ZoneContentConfluence bridge macro for toc-zone.Global
confluence_wireframeConfluence bridge for Balsamiq WireframeConfluenceConfluence Bridge for the Balsamiq Wireframe macro. It only displays the image preview of the wireframe.Current Wiki
containerContainerLayoutA macro to enclose multiple groups and add decoration, such as layout.Global
contentContentContentAllows writing content in any wiki markupGlobal
content-report-tableContent Report TableContentProvides a content report in table format, based on tags.Current Wiki
contextContextDevelopmentExecutes content in the context of the passed pageGlobal
contributorsContributorsContentContributors Confluence Bridge macro to show the contributors of a given document.Current Wiki
dashboardDashboardLayoutA macro to define a dashboard to fill with gadgets.Global
dateDateContentUse the date macro to set and format due dates within task macros and more!Global
diagramDiagramDisplays a diagram.Current Wiki
displayDisplayContentDisplay other pages into the current page.Global
displayIconIconContentDisplay an icon.Global
documentsPagesContentDisplays a list of pages in a LivetableCurrent Wiki
documentTreePage TreeNavigationDisplays the tree of XWiki pages.Current Wiki
embedEmbed contentContentShow in your wiki page many external content. Currently this support theses external services: * Youtube, * Dailymotion, * Vimeo, * x.com, * Google doc, sheets and slides, * Google calendar, * Google maps, * Facebook, * Linkedin, * Figma, * Spotify, * Prezi, * Flickr, * Viddler, * Aha! roadmaps, * Also play a video attached to your wiki page using Video.js library. mp4, webm and ogv formats are supported.Current Wiki
errorError MessageFormattingDisplays an error message note.Global
exampleExampleFormattingShows an example and its source code.Current Wiki
excerptExcerptExcerpt macro. It marks part of the page's content for use by other macros. It is compatible with the Confluence Excerpt macro.Current Wiki
excerpt-includeExcerpt includeContentIncludes excerpts from other documents into the current page. The included pages need to contain the simple `excerpt` macro.Global
expandExpandAdd the Expand macro to your page to provide content in an expandable / collapsible section. This macro can be used to visually reduce the amount of information on a page, break down processes or procedures into clickable steps, or hide background or obsolete information, while still keeping it on the page for future reference.Current Wiki
favoritesFavoritesList all favorite pages of a userGlobal
footnoteFootnoteContentGenerates a footnote to display at the end of the page.Global
galleryGalleryLayoutDisplays the images found in the provided content using a slide-show view.Global
groovyGroovyDevelopmentExecute a groovy script.Global
hide-ifHide ifContentHide the content of this macro if the condition set through the parameters is met.Global
htmlHTMLDevelopmentInserts HTML or XHTML code into the page.Global
iconPickerIcon PickerDevelopmentSelect an icon within the XWiki icon set.Current Wiki
idIdNavigationAllows 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
includeIncludeContentInclude other pages into the current page.Global
infoInfo MessageFormattingDisplays an info message note.Global
jobJobExecute the macro content asynchronously and display progress.Global
jobprogressJob ProgressInternalProvide a UI to follow asynchronous job progressionCurrent Wiki
kanbanKanbanKanban macro allowing to display and edit a kanbanCurrent Wiki
kanbanboardKanban board - Task ManagerContentDisplay the tasks as a Kanban board (see https://en.wikipedia.org/wiki/Kanban_board).Current Wiki
liveDataLive DataContentDisplay dynamic lists of data.Global
locationSearchLocation searchSearch in the given location.Current Wiki
mathjaxMathJaxContentEnter content supported by the MathJax javascript engine.Current Wiki
mentionUser MentionNotificationsInsert a user mention.Current Wiki
menuMenuNavigationDisplays a menu created using simple wiki syntax (nested lists and links).Global
missingLicenseMessageMissing License MessageInternalDisplay an error message when the extension does not have a valid license.Global
msStreamMicrosoft Stream MacroEmbed a Microsoft Stream video in a page by simply passing the URL and any customization parameters.Current Wiki
notificationsNotificationsNotificationsDisplay notifications about events happened on the wiki.Current Wiki
notificationsApplicationsPreferencesNotifications Applications PreferencesNotificationsDisplay the preferences of the current user about notification applications.Current Wiki
notificationsAutoWatchPreferencesNotifications Auto Watch PreferencesNotificationsDisplay the preferences of the current user about auto watched pages.Current Wiki
notificationsCustomFiltersPreferencesNotifications Custom Filters PreferencesNotificationsDisplay the preferences of the given user about custom notification filters.Current Wiki
notificationsEmailPreferencesNotifications Email PreferencesNotificationsDisplay the preferences of the current user about notification emails.Current Wiki
notificationsFiltersPreferencesNotifications Filters Preferences (deprecated)NotificationsDisplay 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
notificationsSystemFiltersPreferencesNotifications System Filters PreferencesNotificationsDisplay the preferences of the given user about system notification filters.Current Wiki
officeOffice Document ViewerContentView office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or importing them.Global
panelPanel MacroPanel macro to display XWiki content inside a panel.Current Wiki
pdftocPDF Table of ContentsInternalGenerates the table of contents for the PDF export.Global
pdfviewerPDF ViewerContentPDF Viewer based on Mozilla pdf.jsGlobal
profile-pictureProfile PictureContentDisplay the profile picture of selected userCurrent Wiki
putFootnotesPut FootnotesContentDisplays all the footnotes from the page. If missing, all footnotes are displayed by default at the end of the page.Global
pythonPythonDevelopmentExecutes a python script.Global
recently-updatedRecently UpdatedContentAdd 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
scriptScriptDevelopmentExecute script in provided script language.Global
show-ifShow ifContentShow the content of this macro if the condition set through the parameters is met.Global
statusStatusInsert a colored label in the text to highlight the status of an item.Current Wiki
successSuccess MessageFormattingDisplays a success message note.Global
tabTabContentTab element for the tab group macro. This is expected to be put as the tab-group macro content.Global
tab-groupTab groupContentThe main macro which group tab macro elementsGlobal
tagcloudTag CloudContentDisplays the cloud of tags in this wiki or in the specified space, if any.Current Wiki
tagListTag listShow a list of all the macros in your instance.Current Wiki
taskTaskContentCreate a task that you can assign an user to using the mention macro and use the date macro to set a deadline.Global
task-reportTask report macroContentCreate a custom report of the tasks within the wiki.Current Wiki
taskcardTask cardContentDisplay a task and its information as a card.Current Wiki
taskganttGantt DiagramContentDisplay tasks from Task Manager Application in a Gantt diagram.Current Wiki
tasksTasksContentDisplay one or more tasks identified by their IDs.Global
tasks-report-macroLegacy Confluence bridge for Tasks ReportContentLegacy Confluence bridge for Tasks Report.Current Wiki
teamTeamDisplay avatars of the members of a team.Current Wiki
templateTemplateDevelopmentInsert a template.Global
tocTable of contentsNavigationGenerates a table of contents.Global
translationTranslationContentDisplay a translation message.Global
treeTreeNavigationDisplays a tree hierarchy defined by the macro content or the source parameter.Current Wiki
uiextensionUI ExtensionDevelopmentInsert a UI extension.Global
uiextensionsUI ExtensionsDevelopmentInsert UI extensions.Global
useravatarUser AvatarContentAllows displaying the avatar for a specific user.Global
userListUser ListContentDisplays a list of users with a customizable set of their propertiesGlobal
userProfileUser ProfileContentDisplays a user profile with custom propertiesGlobal
velocityVelocityDevelopmentExecutes a Velocity script.Global
view-fileView fileContentShow a file using PDF Viewer Macro or Office Viewer.Global
warningWarning MessageFormattingDisplays a warning message note.Global
wikimacrocontentWikiMacro ContentDevelopmentDisplay editable content of a wikimacro.Global
wikimacroparameterWikiMacro ParameterDevelopmentDisplay editable parameter of a wikimacro.Global
wikisWikisNavigationList all wikisCurrent Wiki
workspacesWorkspaces (Legacy)DeprecatedDeprecated macro that should not be used here for compatibility reasons. Please use the "wikis" macro instead.Current Wiki

HTML

2.0 HTML

Information

In XWiki Syntax 2.1 HTML or XHTML must be entered by using the HTML macro.

XWiki Syntax 2.1Result
{{html}}<abbr title="HyperText Markup Language">HTML</abbr>{{/html}} HTML

Scripts

2.0 Scripts

FeatureXWiki Syntax 2.1
Velocity script
{{velocity}}
#set ($var = "whatever")
{{/velocity}}
Groovy script
{{groovy}}
def var = "whatever"
{{/groovy}}