<?xml version="1.0" encoding="UTF-8" standalone="yes"?><extensionVersion xmlns="http://www.xwiki.org/extension"><id>org.xwiki.platform:xwiki-platform-rendering-wikimacro-store</id><name>XWiki Platform - Rendering - Wiki Macro Bridge - Store</name><type>jar</type><rating><totalVotes>0</totalVotes><averageVote>0.0</averageVote></rating><summary>Module dealing with actual data representing wiki macros (wiki pages, objects, etc.)</summary><description>= How to use =

You simply need to add an object of type ##XWiki.WikiMacroClass## to your wiki page, as shown below:

{{image reference="Macro.png" width="960px"/}}

You should follow our [[wiki macro tutorial&gt;&gt;xwiki:Documentation.DevGuide.Tutorials.WritingMacros.WikiMacroTutorial]] to learn more about writing wiki macros.

To see a list of wiki macros installed on your wiki, check the [[Help Center&gt;&gt;Extension.Help Center Application.WebHome]], the Syntax Help or [[navigate&gt;&gt;xwiki:FAQ.How can I navigate to a given page]] to the ##XWiki.XWikiSyntaxMacrosList## page.

Alternatively, you can also navigate to the ##XWiki.WikiMacroClass## page:

{{image reference="WikiMacroClass.png"/}}

= Bindings =

There are several bindings that are available in the code content for the macro.

All of them are available through ##$wikimacro##:

* ##wikimacro.parameters##: The list of all parameters passed to the macro with value converted to the given type, e.g. ##wikimacro.parameters.myparam## would return the value for the ##myparam## parameter in ##~{~{mymacro myparam="myvalue" ...}}##.
* ##wikimacro.content##: The macro content
* ##wikimacro.context##: The Macro Transformation Context (##MacroTransformationContext##) which provides access to information such as the current XDOM Block (and thus access to all parent blocks too. For example a TOC macro would need to find all the Heading blocks), the syntax of the content of the macro, whether the macro is inline or not, etc. This binding is not set if the wikimacro is executed asynchronously. For example to know if the macro is being rendered in an inline context, use ##wikimacro.context.isInline()##.
* ##wikimacro.result##: This is an output parameter into which the result of the macro can be stored if you wish to directly return the desired list of rendering blocks without having to render them first to let them be parsed back by the macro transformation. The benefits are that it could be a lots quicker and most of all it means supporting syntaxes which does not provide any renderer. It also makes it possible to generate some XDOM which is impossible to write in some syntaxes.
* ##wikimacro.doc##: The ##com.xpn.xwiki.api.Document## instance of the document in which the macro is defined.
* ##wikimacro.descriptor##: The macro descriptor. It returns a ##org.xwiki.rendering.macro.descriptor.MacroDescriptor## Java object. For example if you wish to test if the macro supports the inline mode, you can use: ##wikimacro.descriptor.supportsInlineMode()##.

Some bindings are also available through ##$xcontext.macro## but they are now considered as deprecated:

* ##xcontext.macro.params##: The list of all parameters passed to the macro, e.g. ##xcontext.macro.params.myparam## would return the **String value** for the ##myparam## parameter in ##~{~{mymacro myparam="myvalue" ...}}##.
* ##xcontext.macro.content##: The macro content
* ##xcontext.macro.context##: The Macro Transformation Context (##MacroTransformationContext##) which provides access to information such as the current XDOM Block (and thus access to all parent blocks too. For example a TOC macro would need to find all the Heading blocks), the syntax of the content of the macro, whether the macro is inline or not, etc.
* ##xcontext.macro.result##: This is an output parameter into which the result of the macro can be stored if you wish to directly return the desired list of rendering blocks without having to render them first to let them be parsed back by the macro transformation. The benefits are that it could be a lots quicker and most of all it means supporting syntaxes which does not provide any renderer. It also makes it possible to generate some XDOM which is impossible to write in some syntaxes.
* ##xcontext.macro.doc##: The ##com.xpn.xwiki.api.Document## instance of the document in which the macro is defined.
* ##xcontext.macro.descriptor##: The macro descriptor. It returns a ##org.xwiki.rendering.macro.descriptor.MacroDescriptor## Java object.</description><licenses><name>GNU Lesser General Public License 2.1</name></licenses><website>http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiMacroStore/</website><authors><name>XWiki Development Team</name><url>https://xwiki.org/xwiki/bin/view/XWiki/XWikiTeam</url></authors><scm><connection><system>git</system><path>git://github.com/xwiki/xwiki-platform.git/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-wikimacro/xwiki-platform-rendering-wikimacro-store</path></connection><developerConnection><system>git</system><path>git@github.com:xwiki/xwiki-platform.git/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-wikimacro/xwiki-platform-rendering-wikimacro-store</path></developerConnection><url>https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-wikimacro/xwiki-platform-rendering-wikimacro-store/</url></scm><issueManagement><system>jira</system><url>https://jira.xwiki.org/browse/XWIKI</url></issueManagement><recommended>false</recommended><properties><key>maven.groupid</key><stringValue>org.xwiki.platform</stringValue></properties><properties><key>maven.artifactid</key><stringValue>xwiki-platform-rendering-wikimacro-store</stringValue></properties><properties><key>maven.Model</key><stringValue>org.xwiki.platform:xwiki-platform-rendering-wikimacro-store:jar:18.7.0</stringValue></properties><properties><key>xwiki.extension.recommendedVersions.commons</key><stringValue>org.xwiki.commons:.*/[18.7.0]</stringValue></properties><properties><key>xwiki.extension.recommendedVersions.platform</key><stringValue>org.xwiki.commons:.*/[18.7.0],
      org.xwiki.rendering:.*/[18.7.0],
      org.xwiki.platform:.*/[18.7.0]</stringValue></properties><properties><key>xwiki.extension.recommendedVersions</key><stringValue>org.xwiki.commons:.*/[18.7.0],
      org.xwiki.rendering:.*/[18.7.0],
      org.xwiki.platform:.*/[18.7.0]</stringValue></properties><version>4.2</version><repositories><id>maven-xwiki</id><uri>https://nexus.xwiki.org/nexus/content/groups/public</uri><type>maven</type></repositories></extensionVersion>