help.syntaxpage.title
Редактировал(а) Станислав Федоров 2021/06/09 23:51
help.syntaxtitle » Programming » Macros
help.syntaxtitle: 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
| help.macroList.id | help.macroList.name | help.macroList.category | help.macroList.description | help.macroList.visibility |
|---|---|---|---|---|
| toc | Table Of Contents | Navigation | Generates a Table Of Contents. | Global |
| formula | Formula | Content | Displays a mathematical formula. | Global |
| useravatar | User Avatar | Content | Allows displaying the avatar for a specific user. | Global |
| wikimacrocontent | WikiMacro Content | Development | Display editable content of a wikimacro. | 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 |
| gallery | Gallery | Layout | Displays the images found in the provided content using a slide-show view. | Global |
| async | Async | Content | Asynchronous and cached execution of wiki content. | Global |
| dashboard | Dashboard | Layout | A macro to define a dashboard. | Global |
| box | Box | Formatting | Draw a box around provided content. | Global |
| error | Error Message | Formatting | Displays an error message note. | Global |
| putFootnotes | Put Footnote | Content | Displays the footnotes defined so far. If missing, all footnotes are displayed by default at the end of the page. | Global |
| warning | Warning Message | Formatting | Displays a warning message note. | Global |
| cache | Cache | Development | Caches content. | Global |
| display | Display | Content | Display other pages into the current page. | Global |
| translation | Translation | Content | Display a translation message. | Global |
| context | Context | Development | Executes content in the context of the passed document | Global |
| info | Info Message | Formatting | Displays an info message note. | Global |
| liveData | Live Data | Content | Display dynamic lists of data. | Global |
| rss | RSS | Content | Output latest feed entries from a RSS feed. | Global |
| velocity | Velocity | Development | Executes a Velocity script. | Global |
| success | Success Message | Formatting | Displays a success message note. | Global |
| template | Template | Development | Insert a template. | Global |
| wikimacroparameter | WikiMacro Parameter | Development | Display editable parameter of a wikimacro. | Global |
| chart | Chart | Content | Displays a graphical chart generated from miscellaneous data sources | Global |
| footnote | Footnote | Content | Generates a footnote to display at the end of the page. | Global |
| groovy | Groovy | Development | Execute a groovy script. | Global |
| container | Container | Layout | A macro to enclose multiple groups and add decoration, such as layout. | Global |
| code | Code | Formatting | Highlights code snippets of various programming languages | Global |
| python | Python | Development | Executes a python script. | Global |
| comment | Comment | Development | Allows putting comments in the source content. This macro doesn't output anything. | Global |
| content | Content | Content | Allows writing content in any wiki markup | Global |
| html | HTML | Development | Inserts HTML or XHTML code into the page. | Global |
| 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 |
| script | Script | Development | Execute script in provided script language. | Global |