0 Votes

MyWiki

Version 19.1 by Ryan C on 2025/04/28 07:45
Warning
For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

XWiki Macros Reference Guide

Macros in XWiki are reusable pieces of functionality that can be integrated inside pages. They allow you to insert dynamic content or apply special formatting using a simple syntax. Below is a list of available macros (excluding deprecated or internal macros) along with their descriptions and usage examples.

TOC Macro

The TOC macro generates a Table of Contents.

Box Macro

The Box macro draws a box around the content inside it. This is useful for highlighting important information or grouping related content in a styled panel.

Note

This is a sample box message.

{{box title="Note"}}
This is a sample box message.
{{/box}}

Info Macro

The Info macro displays an informational message in a styled box. It is typically rendered with a blue color to denote general information.

Information

This is an informational message.

{{info}}
This is an informational message.
{{/info}}
Information
FYI

This is an informational message with a title.

{{info title="FYI"}}
This is an informational message with a title.
{{/info}}

Warning Macro

The Warning macro highlights a warning message in a styled box (yellow/orange background).

Warning

This is a warning message.

{{warning}}
This is a warning message.
{{/warning}}

Success Macro

The Success macro displays a success message in a green-styled box.

Success

This is a success message.

{{success}}
This is a success message.
{{/success}}

Error Macro

The Error macro displays a critical error or alert message in a red-styled box.

Error

This is an error message.

{{error}}
This is an error message.
{{/error}}

Chart Macro

The Chart macro generates graphical charts based on input tables.

{{chart type="pie" source="inline" params="range:B2-B4;series:columns;" width="400" height="300"}}
|=Category|=Value|
|A|10|
|B|20|
|C|30|
{{/chart}}
{{chart type="bar" source="inline" params="range:B2-C4;series:columns;" width="500" height="300"}}
|=Quarter|=Product X|=Product Y|
|Q1|20|15|
|Q2|30|25|
|Q3|25|30|
{{/chart}}

Children Macro

The Children macro lists the child pages of the current page.

Code Macro

The Code macro highlights and formats source code.

public class Hello {
   public static void main(String[] args) {
        System.out.println("Hello World");
   }
}
{{code language="java"}}
public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
{{/code}}

Comment Macro

The Comment macro hides content from page rendering.

Visible part 1.

Visible part 2.

Visible part 1.
{{comment}}This text will not be visible.{{/comment}}
Visible part 2.

Container Macro

The Container macro creates multi-column layouts.

Column 1: This is the first column.

Column 2: This is the second column.

{{container layoutStyle="columns"}}
(((**Column 1:** This is the first column.)))
(((**Column 2:** This is the second column.)))
{{/container}}

Dashboard Macro

The Dashboard macro creates areas for gadgets.

{{dashboard columns="2"/}}

Display Macro

The Display macro embeds content from another page.

{{display page="Help.Macros"/}}

DisplayIcon Macro

The DisplayIcon macro displays an icon.

 Home

{{displayIcon name="home"/}} Home

Documents Macro

The Documents macro shows a livetable of documents.

{{documents space="MySpace"/}}

DocumentTree Macro

The DocumentTree macro shows a collapsible page tree.

Footnote Macro

The Footnote macro adds footnotes to the page.

This is a statementSource: Example Reference.
The [putFootnotes] macro is a standalone macro and it cannot be used inline. Click on this message for details.

This is a statement{{footnote}}Source: Example Reference{{/footnote}}.
{{putFootnotes/}}

PutFootnotes Macro

The PutFootnotes macro outputs collected footnotes.

...page content...
The [putFootnotes] macro is a standalone macro and it cannot be used inline. Click on this message for details.

...page content...
{{putFootnotes/}}

Gallery Macro

The Gallery macro displays a collection of images.

{{gallery}}
image:Space.Page@Image1.png
image:Space.Page@Image2.png
{{/gallery}}

Groovy Macro

The Groovy macro executes Groovy scripts.

Failed to execute the [groovy] macro. Cause: [The execution of the [groovy] script macro is not allowed in [xwiki:MyWiki.WebHome]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

{{groovy}}
println("Hello from Groovy!")
{{/groovy}}

HTML Macro

The HTML macro embeds raw HTML into pages.

This is red text via HTML.

{{html}}
<p style="color:red;">This is red text via HTML.</p>
{{/html}}

Id Macro

The Id macro defines an internal link anchor.

Click here to jump.


Target Location: You have reached the target.

Click [[here>>#myanchor]] to jump.

{{id name="myanchor"/}}
**Target Location:** You have reached the target.

Include Macro

The Include macro includes another page's content.

{{include page="Help.Introduction"/}}

Mention Macro

The Mention macro notifies a mentioned user.

Failed to execute the [mention] macro. Cause: [Parameter [reference] is mandatory]. Click on this message for details.

{{mention user="xwiki:JohnDoe"/}}

Notifications Macro

The Notifications macro displays recent activity.

edited by Ryan CRyan C
18 hours ago
deleted by Ryan CRyan C
1 day ago
deleted by Ryan CRyan C
1 day ago
edited by 2 users
Ryan C Unknown User
1 day ago
edited by Ryan CRyan C
4 days ago
created by Ryan CRyan C
4 days ago
edited by Unknown UserUnknown User
4 days ago
edited by Ryan CRyan C
2 weeks ago
edited by 2 users
Ryan C Unknown User
2 weeks ago
created by Ryan CRyan C
2 weeks ago
{{notifications/}}

Office Macro

The Office macro displays Office documents.

Failed to execute the [office] macro. Cause: [The wiki needs to be connected to an office server in order to view office files. Ask your administrator to configure such a server.]. Click on this message for details.

{{office attachment="Main.UserGuide@Guide.docx"/}}

Python Macro

The Python macro executes Python scripts.

Failed to execute the [python] macro. Cause: [You need Programming Rights to execute the script macro [python]]. Click on this message for details.

{{python}}
print("Hello from Python!")
{{/python}}

Script Macro

The Script macro executes scripts in different languages.

Failed to execute the [script] macro. Cause: [The execution of the [script] script macro is not allowed in [xwiki:MyWiki.WebHome]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

{{script language="velocity"}}
#set($name = "Velocity")
Hello $name!
{{/script}}

Tag Cloud Macro

The Tag Cloud macro displays tags visually.

No page has been tagged yet

{{tagcloud/}}

User Avatar Macro

The User Avatar macro shows a user's avatar image.

Invalid macro parameters used for the [useravatar] macro. Cause: [Property [username] mandatory]. Click on this message for details.

{{useravatar user="xwiki:JohnDoe"/}}

Velocity Macro

The Velocity macro executes Velocity scripts.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:MyWiki.WebHome]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

{{velocity}}
#set($name = "Alice")
Hello $name!
{{/velocity}}

Menu Macro

The Menu macro builds a navigation menu.

{{menu}}
* [[Home>>Main.WebHome]]
* [[Products>>Main.Products]]
** [[Product A>>Main.Products.ProductA]]
** [[Product B>>Main.Products.ProductB]]
* [[Contact>>Main.Contact]]
{{/menu}}

Button Macro

The Button macro inserts a styled clickable button.

Failed to execute the [button] macro. Cause: [Parameter [label] is mandatory]. Click on this message for details.

{{button link="https://xwiki.org" style="primary"}}
Click Me
{{/button}}

Carousel Macro

The Carousel macro displays a slideshow of images.

{{carousel}}
image:Space.Page@Image1.png
image:Space.Page@Image2.png
{{/carousel}}

Embed Macro

The Embed macro shows external content like YouTube videos.

{{embed url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"/}}

Expandable Macro

The Expandable macro shows expandable hidden content.

Failed to execute the [expandable] macro. Cause: [Parameter [summary] is mandatory]. Click on this message for details.

{{expandable title="Click to Expand"}}
Hidden details appear here.
{{/expandable}}

Excerpt Macro

The Excerpt macro marks content for reuse elsewhere.

Unknown macro: missingLicenseMessage. Click on this message for details.

{{excerpt}}
This is excerpted content.
{{/excerpt}}

FAQ Macro

The FAQ macro lists FAQ entries.

Results 0 - 0 out of 0 per page of Page
Actions
Results 0 - 0 out of 0 Page
{{faq space="FAQ"/}}

Live Data Macro

The LiveData macro displays dynamic data tables.

{{liveData source="document"/}}

Panel Macro

The Panel macro creates styled content boxes.

Unknown macro: missingLicenseMessage. Click on this message for details.

{{panel title="Panel Title"}}
This is inside a panel.
{{/panel}}

PDF Viewer Macro

The PDFViewer macro embeds PDFs using PDF.js.

Failed to execute the [pdfviewer] macro. Cause: [Parameter [file] is mandatory]. Click on this message for details.

{{pdfviewer attachment="MyPage@file.pdf"/}}

Profile Picture Macro

The Profile Picture macro shows a user’s picture.

Unknown macro: missingLicenseMessage. Click on this message for details.

{{profile-picture user="xwiki:JohnDoe"/}}

Recently Updated Macro

The Recently Updated macro lists recent changes.

Unknown macro: missingLicenseMessage. Click on this message for details.

{{recently-updated/}}

Status Macro

The Status macro adds a colored status label.

Unknown macro: missingLicenseMessage. Click on this message for details.

{{status value="In Progress" color="yellow"/}}

Team Macro

The Team macro shows avatars of a team.

Unknown macro: missingLicenseMessage. Click on this message for details.

{{team space="TeamSpace"/}}

Tooltip Macro

The Tooltip macro shows hints on hover.

Hover .

Hover {{tooltip content="Extra Information"}}here{{/tooltip}}.

Tree Macro

The Tree macro shows a hierarchical list.

{{tree}}

[[Parent>>Parent.Page]]
** [[Child 1>>Parent.Child1]]
** [[Child 2>>Parent.Child2]]
{{/tree}}

Video Macro

The Video macro embeds videos.


{{video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"/}}

View File Macro

The View File macro shows a file viewer for an attached file.

 The [pdfviewer] macro is a standalone macro and it cannot be used inline. Click on this message for details.
 

 {{pdfviewer attachment="MyPage@MyAttachedFile.pdf"/}} 

UI Extension Macro

The UIExtension macro injects UI elements into extension points.

 Failed to execute the [uiextension] macro. Cause: [Failed to find an extension id id [org.xwiki.platform.panels]]. Click on this message for details.
 

 {{uiextension id="org.xwiki.platform.panels"/}} 

UI Extensions Macro

The UIExtensions macro lists UI extensions for a given extension point.

  

 {{uiextensions extensionpoint="org.xwiki.platform.panels"/}}