Changes for page Writing XWiki Rendering Macros in wiki pages
Last modified by Clément Desableau on 2023/06/01
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ThomasMortagne1 +XWiki.VincentMassol - Content
-
... ... @@ -76,10 +76,10 @@ 76 76 Introducing a parameter to a wiki macro is pretty straight forward; you simply need to add an object of type ##XWiki.WikiMacroParameterClass## into your wiki macro document (one object per parameter). This class contains several fields that allow you to define your parameter clearly: 77 77 78 78 * Parameter name: Name of the parameter, users will refer this name when invoking your macro with parameters 79 -* Parameter description: A short description of the parameter, this description will be made available on the WYSIWYG editor 79 +* Parameter description (optional): A short description of the parameter, this description will be made available on the WYSIWYG editor 80 80 * Parameter mandatory: Indicates if this particular parameter is mandatory, wiki macro will fail to execute if a mandatory parameter is missing 81 -* Parameter default value: The default value of the parameter when it's empty 82 -* Parameter type: Indicates in which type the parameter value should be converted in (java.lang.String by default) 81 +* Parameter default value (optional): {{info}}Since 10.10{{/info}} The default value of the parameter when it's empty 82 +* Parameter type (optional): {{info}}Since 10.10{{/info}} Indicates in which type the parameter value should be converted in (java.lang.String by default) 83 83 84 84 Now we're going to extend our **hello macro** with a parameter. We will introduce a parameter named //greetUser// that will indicate if the greeting message should be tailored for the current user viewing the page. The definition of the parameter is shown below: 85 85