XWiki Syntax Guide
Last modified by superadmin on 2023/01/12 15:47
XWiki Syntax 2.1 » Programming » Macros
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"/}}
| 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 |
| afd | afd | Articles marked for deletion | Global | |
| 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 |
| bc | bc | Global | ||
| blockquote | blockquote | Formatting | Display a block quote | Global |
| botaddedpage | botaddedpage | Development | Displays a warning when a page has been added by a bot | Global |
| box | Box | Formatting | Draw a box around provided content. | Global |
| button | Button | Insert a button! | 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 |
| clearfloats | clearfloats | Deprecated | Global | |
| code | Code | Formatting | Highlights code snippets of various programming languages | Global |
| column | Column | 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_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 |
| dashboard | Dashboard | Layout | A macro to define a dashboard to fill with gadgets. | Global |
| db | db | Formatting | Shows reference to the Dragonborn documentation page as exponent | Global |
| dg | dg | Formatting | Shows reference to the Dawnguard documentation page as exponent | Global |
| didyouknow | didyouknow | #### ##WARNING: THIS MACRO IS NOT ACTUALLY IMPLEMENTED YET, THIS IS JUST A PLACEHOLDER | Global | |
| 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 |
| 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 |
| forums | Forums | [MediaWiki Migration] - Displays the forums link with a title. | Global | |
| function | Function | [MediaWiki] Macro to display informations about a function | 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 |
| hf | hf | Formatting | Shows reference to the Hearthfire documentation page as exponent | 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 |
| incomplete | Incomplete | Content | Indicate that a page is incomplete | Global |
| indepth | indepth | Content | Macro to display explanation of a term, or the reasoning behind a specific technique | Global |
| info | Info Message | Formatting | Displays an info message note. | Global |
| japanesepage | japanesepage | Content | Indicate that the current page is in Japanese and needs editing | Global |
| key | key | Formatting | Shows a key press icon | Global |
| languages | Languages | Navigation | Provide a list of existing translations on the current page, along with links to each translated version | Global |
| languages-fr | languages-fr | Deprecated | Global | |
| layout-cell | Layout Cell Macro | content | Current Wiki | |
| layout-section | Layout Section Macro | content | Current Wiki | |
| liveData | Live Data | Content | Display dynamic lists of data. | Global |
| mediawikiBox | Box (Media Wiki) | Internal | Abstract box macro used to migrate several Media Wiki box macros. | Global |
| 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 | Internal | 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 | content | Bridge for the Confluence Multimedia macro. | Current Wiki |
| net-presago-stream-macro | Microsoft Stream Confluence Bridge | Content | Bridge for the Confluence Microsoft Stream Macro. | |
| newfeature | newfeature | Content | Macro to indicate a new tool or technique that users of previous Bethesda toolsets may want to take note of | Global |
| nifse | NifSE NiTexturingProperty Texture Slots | [MediaWiki Migration] - List of the texture slots used by NiTexturingProperty. | 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 |
| numberofarticles | numberofarticles | Displays the non-hidden documents in a given space. | Global | |
| obse | OBSE | Internal | Global | |
| office | Office Document Viewer | Content | View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or importing them. | Global |
| pagetitle | Page Title | Formatting | Display a custom page title where the macro is used | Global |
| panel | Panel Macro | content | Display a panel with styles | 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 |
| polishpage | polishpage | Content | Indicate that the current page is in Polish | Global |
| procedures | Procedures | Description | Global | |
| protip | protip | Macro to display helpful tips and shortcuts | Global | |
| 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 |
| russianpage | Russian Page Warning | Content | Indicate that the current page is in Russian | Global |
| script | Script | Development | Execute script in provided script language. | Global |
| section | Section | content | ||
| server | server | The macro produces the server URL but it's not terribly useful for creating other more complex links in wiki syntax, firstly because the it will not be recognized as a macro when inserted between '[[' ']]', and secondly because xwiki syntax provide various and simpler ways for this for example just using a relative path like so [[path:/Sandbox/TestPage1]] | Global | |
| settinggroupfooter | settinggroupfooter | This macro is used in conjunction with ~{~{settinggroupheader/~}~} and ~{~{settinggroupsetting default="" name="" description=""/~}~} to document groups of relating settings using a single table. | Global | |
| settinggroupheader | settinggroupheader | This macro is used in conjunction with ~{~{settinggroupsetting default="" name="" description=""/~}~} and ~{~{SettingGroupFooter/~}~} to document groups of relating settings using a single table. | Global | |
| settinggroupsetting | settinggroupsetting | This macro is used in conjunction with ~{~{settinggroupheader/~}~} and ~{~{SettingGroupFooter/~}~} to document groups of relating settings using a single table. | Global | |
| sksefunction | sksefunction | Formatting | Indicate the minimal requirement of SKSE to use on this page | Global |
| spaceindex | Space Index | Deprecated | Lists the pages in a space. | Current Wiki |
| status | Status | Insert a colored label in the text to highlight the status of an item. | Current Wiki | |
| steamtip | Steam tip | Global | ||
| 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 | content | This macro displays the team members which have a specific tag | Current Wiki |
| template | Template | Development | Insert a template. | Global |
| template-bethsoft_tutorial_toc | template-bethsoft_tutorial_toc | Global | ||
| template-editor-property-add | template-editor-property-add | Content | Shows a description of the Add Destruction Data editor property | Global |
| template-editor-property-conditions | template-editor-property-conditions | Content | Provide an editor property with conditions. | Global |
| template-editor-property-id | template-editor-property-id | Content | Shows a description of the ID editor property | Global |
| template-editor-property-keywords | template-editor-property-keywords | Content | Shows a description of the Keywords editor property | Global |
| template-editor-property-model | template-editor-property-model | Content | Shows a description of the Model editor property | Global |
| template-editor-property-name | template-editor-property-name | Content | Shows a description of the Name editor property | Global |
| template-editor-property-playable | template-editor-property-playable | Content | Shows a description of the Playable editor property | Global |
| template-editor-property-preview | template-editor-property-preview | Content | Shows a description of the Preview Transform editor property | Global |
| template-editor-propertyobsolete | template-editor-propertyobsolete | Content | Indicate that an editor property is deprecated. | Global |
| template-incomplete | Template Incomplete | Internal | Internal macro providing the same functionality as the incomplete macro | Global |
| template-incomplete-article | Template Incomplete Article | Deprecated | Global | |
| template-indepth | template-indepth | Deprecated | Deprecated macro to display explanation of a term, or the reasoning behind a specific technique. Use the indepth macro instead. | Global |
| template-papyrus-requiredf4se | Required F4SE Version | Content | Indicate that the content described on the page requires a given F4SE version | Global |
| template-tutorial_bottom_bar | template-tutorial_bottom_bar | Deprecated | Display navigation bar at the end of a tutorial | Global |
| tip | Tip | Current Wiki | ||
| toc | Table of contents | Navigation | Generates a table of contents. | Global |
| tools | Tools | [MediaWiki Migration] Displays the tools used in a tutorial. There's a maximum of up to 10 required and optional tools | 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 |
| tutorial | tutorial | Navigation | Global | |
| tutorial-index | tutorial-index | Display a tutorial index box | Global | |
| tutorial_bottom_bar | tutorial_bottom_bar | Navigation | Display navigation bar at the end of a tutorial | Global |
| uiextension | UI Extension | Development | Insert a UI extension. | Global |
| uiextensions | UI Extensions | Development | Insert UI extensions. | Global |
| ulink | Universal Link | Deprecated | Global | |
| unfinished | unfinished | Articles marked for deletion | Global | |
| update | Update | [MediaWiki Migration] Indicates that the article needs to be updated. | Global | |
| useravatar | User Avatar | Content | Allows displaying the avatar for a specific user. | Global |
| userlister | User Lister | This macro displays the members of the given group(s). | Current Wiki | |
| 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 |
| warningbox | Warning Box | Deprecated | Macro displaying quick warnings - gotchas, common errors and stuff to watch out for | 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 | Global |
| 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. | Global |