XWiki Syntax 2.1: 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
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
rssRSSContentOutput latest feed entries from a RSS feed.Global
groovyGroovyDevelopmentExecute a groovy script.Global
scriptScriptDevelopmentExecute script in provided script language.Global
footnoteFootnoteContentGenerates a footnote to display at the end of the page.Global
htmlHTMLDevelopmentInserts HTML or XHTML code into the page.Global
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
useravatarUser AvatarContentAllows displaying the avatar for a specific user.Global
templateTemplateInternalInsert a template.Global
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
tabsTabbed view rendererContentCreates tabbed view for content areas wrapped into <div /> with unique id (see macro home for details)Current Wiki
warningWarning MessageFormattingDisplays a warning message note.Global
velocityVelocityDevelopmentExecutes a Velocity script.Global
infoInfo MessageFormattingDisplays an info message note.Global
pythonPythonDevelopmentExecutes a python script.Global
spaceindexSpace IndexDeprecatedLists documents in a space.Current Wiki
plantumlPlantUMLcontentGenerate Diagrams using PlantUML.Current Wiki
iconPickerIcon PickerDevelopmentSelect an icon within the XWiki icon set.Current Wiki
spacesSpacesDeprecatedDisplays all the spaces in this wiki.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
messageSenderMessage SenderSocialA control that allows users to enter messages that are handled by the MessageStream module.Current Wiki
xsltxsltXSLT Macro help to transform XML document with XSLT style-sheet.
Macro is able to retrieve XML document or style sheet from attachment or URL
XML document or else style sheet could be the content of the macro.
Parameters could be pass to the XSLT style-sheet.
Global
sequenceSequence DiagramcontentDraws a sequence diagram using http://www.websequencediagrams.com/Global
officeOffice Document ViewerContentView office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or importing them.Global
displayDisplayContentDisplay other pages into the current page.Global
numberedheadingsnumberedheadingsNavigationAutomatically add numbers to headingsGlobal
tagcloudTag CloudContentDisplays the cloud of tags in this wiki or in the specified space, if any.Current Wiki
contentContentContentAllows writing content in any wiki markupGlobal
translationTranslationContentDisplay a translation message.Global
watchlistWatchlistContentShow the content of your current watchlist.Current Wiki
childrenChildrenNavigationDisplays a tree of children pages of the current pageCurrent Wiki
tocTable Of ContentsNavigationGenerates a Table Of Contents.Global
containerContainerLayoutA macro to enclose multiple groups and add decoration, such as layout.Global
successSuccess MessageFormattingDisplays a success message note.Global
contextContextDevelopmentExecutes content in the context of the passed documentGlobal
ServiceAreaService AreaPayExCreate a list item for a service area. Intended for the front page.Current Wiki
codeCodeFormattingHighlights code snippets of various programming languagesGlobal
commentCommentDevelopmentAllows putting comments in the source content. This macro doesn't output anything.Global
dashboardDashboardLayoutA macro to define a dashboard.Global
putFootnotesPut FootnoteContentDisplays the footnotes defined so far. If missing, all footnotes are displayed by default at the end of the page.Global
ServiceBoxService BoxPayExService box intended for service and productsGlobal
documentsDocumentsContentDisplays a list of documents in a LivetableCurrent Wiki
menuMenuNavigationDisplays a menu created using simple wiki syntax (nested lists and links).Global
errorError MessageFormattingDisplays an error message note.Global
documentTreeDocument TreeNavigationDisplays the tree of XWiki documents.Current Wiki
formulaFormulaContentDisplays a mathematical formula.Global
showhideshowhidecontentShow Hide MacroCurrent Wiki
cacheCacheDevelopmentCaches content.Global
treeTreeNavigationDisplays a tree hierarchy defined by the macro content or the source parameter.Current Wiki
boxBoxFormattingDraw a box around provided content.Global
galleryGalleryLayoutDisplays the images found in the provided content using a slide-show view.Global
includeIncludeContentInclude other pages into the current page.Global
chartChartContentDisplays a graphical chart generated from miscellaneous data sourcesGlobal
Tags:
Created by superadmin on 2013/11/14 17:41
   

Tips

If you're starting with XWiki, check out the Getting Started Guide.

Need help?

If you need help with XWiki you can contact: