XWiki Syntax Guide

Last modified by Justin Morgan on 2019/09/29 18:05

XWiki Syntax 2.1 » » ${crtSection.name}

XWiki Syntax 2.1: $sectionName

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

Radeox macros cannot be used in XWiki Syntax 2.1. Thus they have been rewritten as Rendering macros.

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

Macros in this wiki

IdNameCategoryDescriptionVisibility
tocTable Of ContentsNavigationGenerates a Table Of Contents.Global
iconPickerIcon PickerDevelopmentSelect an icon within the XWiki icon set.Current Wiki
forum.recentForumDiscussionsRecent Forum DiscussionsContentLists the top N most recent discussions from all the forums
A discussion is considered recent if:
  • new topic is created on a forum
  • new topic is edited of a forum
  • new answer is created on a topic
  • new answer is edited (this will include comment added and comment edited)|Current Wiki
blogPostLayoutFullBlog Post Layout FullThis macro is used to display a full blog postCurrent Wiki
wikimacrocontentWikiMacro ContentDevelopmentDisplay editable content of a wikimacro.Global
exampleExampleShows an example and its source code.Current Wiki
watchlistWatchlistContentShow the content of your current watchlist.Current Wiki
blogPostLayoutImageBlog Post Layout ImageThis macro is used to display a full blog post with a thumbnail imageCurrent Wiki
asyncAsyncContentAsynchronous and cached execution of wiki content.Global
spaceindexSpace IndexDeprecatedLists documents in a space.Current Wiki
figureCaptionFigure CaptionDevelopmentProvide a figure caption when used inside the Figure macro.Global
filetagcloudFileManager tag cloudContentDisplays the cloud of file tags in this wiki or in the specified space, if any.Current Wiki
boxBoxFormattingDraw a box around provided content.Global
iconFont Awesome iconIconsInserts a Font Awesome iconCurrent Wiki
spacesSpacesDeprecatedDisplays all the spaces in this wiki.Current Wiki
errorError MessageFormattingDisplays an error message note.Global
attachmentGalleryPickerAttachment PickerDevelopmentGrid based attachment picker.Global
sortable_tablesSorteable TablesMakes all tables in the content of the current page sorteable.Current Wiki
warningWarning MessageFormattingDisplays a warning message note.Global
messageSenderMessage SenderSocialA control that allows users to enter messages that are handled by the MessageStream module.Current Wiki
childrenChildrenNavigationDisplays a tree of children pages of the current pageCurrent Wiki
workspacesWorkspacesDeprecatedDeprecated macro that should not be used, here for compatibility reason. Please use the "wikis" macro instead.Current Wiki
displayDisplayContentDisplay other pages into the current page.Global
translationTranslationContentDisplay a translation message.Global
pollsrecentRecent PollsDisplays the N most recent polls.Current Wiki
contextContextDevelopmentExecutes content in the context of the passed documentGlobal
pdftocPDF Table of ContentsInternalGenerates the table of contents for the PDF export.Global
jiraJIRAContentFetches information from a JIRA server and displays them as a table, list or enumeration.Global
infoInfo MessageFormattingDisplays an info message note.Global
moccacalendarMocca CalendarContentDisplays a CalendarCurrent Wiki
treeTreeNavigationDisplays a tree hierarchy defined by the macro content or the source parameter.Current Wiki
liveDataLive DataContentDisplay dynamic lists of data.Global
blogsBlogs LivetableThe blogs macro is used to list on a livetable all the blog available on the wiki Current Wiki
successSuccess MessageFormattingDisplays a success message note.Global
documentTreeDocument TreeNavigationDisplays the tree of XWiki documents.Current Wiki
nextmeetingsNext MeetingsDisplays a defined number of upcoming meetingsCurrent Wiki
templateTemplateDevelopmentInsert a template.Global
chartChartContentDisplays a graphical chart generated from miscellaneous data sourcesGlobal
fileManager.recentFilesRecent FilesContentLists the files that have been recently uploaded through the File Manager.Current Wiki
containerContainerLayoutA macro to enclose multiple groups and add decoration, such as layout.Global
notificationsEmailPreferencesNotifications Email PreferencesNotificationsDisplay the preferences of the current user about notification emails.Current Wiki
activityActivityContentThe Activity Macro provides information about recent activities done by the users inside the XWiki instance. It lists the create, edit and delete events for pages, as well as comments, attachments and annotations.Current Wiki
blogPostLayoutLinkBlog Post Layout LinkThis macro is used to display a blog post as a simple linkCurrent Wiki
pythonPythonDevelopmentExecutes a python script.Global
commentCommentDevelopmentAllows putting comments in the source content. This macro doesn't output anything.Global
blogPostLayoutCardsCards Blog Post LayoutThis macro is used to display a blog post using the 'Cards' layoutCurrent Wiki
htmlHTMLDevelopmentInserts HTML or XHTML code into the page.Global
contentContentContentAllows writing content in any wiki markupGlobal
scriptScriptDevelopmentExecute script in provided script language.Global
useravatarUser AvatarContentAllows displaying the avatar for a specific user.Global
displayIconIconContentDisplay an icon.Global
officeOffice Document ViewerContentView office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or importing them.Global
mapMapDisplay an interactive geographical mapCurrent Wiki
galleryGalleryLayoutDisplays the images found in the provided content using a slide-show view.Global
uiextensionUI ExtensionsDevelopmentInsert a UI extension.Global
dashboardDashboardLayoutA macro to define a dashboard.Global
uiextensionsUI ExtensionsDevelopmentInsert UI extensions.Global
figureFigureDevelopmentTag content as an illustration and with an optional caption.Global
putFootnotesPut FootnoteContentDisplays the footnotes defined so far. If missing, all footnotes are displayed by default at the end of the page.Global
wikisWikisNavigationList all wikisCurrent Wiki
attachmentSelectorAttachment SelectorDevelopmentA control to be used for object properties of the current document that are supposed to contain the name of an attachment from the current (or target) document. Allows uploading new attachments, and deleting attachments from the target document.  If no target document is specified, the current document will be used. Object properties are only saved to the current document.Current Wiki
notificationsApplicationsPreferencesNotifications Applications PreferencesNotificationsDisplay the preferences of the current user about notification applications.Current Wiki
taskcardTask cardDisplay a task and its information as a card.Global
cacheCacheDevelopmentCaches content.Global
menuMenuNavigationDisplays a menu created using simple wiki syntax (nested lists and links).Global
blogPostLayoutCompactBlog Post Layout CompactThis macro is used to display a full blog post in a compact modeCurrent Wiki
ideasrecentRecent IdeasDisplays the N most recent ideas.Current Wiki
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
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
figureTypeRecognizerFigure Type RecognizerInternalInternal macro used to recognize the type of a figure.Global
filemanagerdocFile Manager DocumentContentInserts a file manager document in a page, with or without previewCurrent Wiki
documentsDocumentsContentDisplays a list of documents in a LivetableCurrent Wiki
notificationsFiltersPreferencesNotifications Filters PreferencesNotificationsDisplay the preferences of the current user about notification filters.Current Wiki
notificationsNotificationsNotificationsCurrent Wiki
velocityVelocityDevelopmentExecutes a Velocity script.Global
pdfviewerpdfviewerContentPDF Viewer based on Mozilla pdf.jsCurrent Wiki
faqFAQLists FAQ entriesCurrent Wiki
wikimacroparameterWikiMacro ParameterDevelopmentDisplay editable parameter of a wikimacro.Global
groovyGroovyDevelopmentExecute a groovy script.Global
footnoteFootnoteContentGenerates a footnote to display at the end of the page.Global
kanbanboardKanban boardDisplay the tasks as a Kanban board (see https://en.wikipedia.org/wiki/Kanban_board).Global
jwplayerJW PlayerContentThe 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
codeCodeFormattingHighlights code snippets of various programming languagesGlobal
calendarCalendarContentDisplays a CalendarCurrent 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