Changes for page Writing XWiki Rendering Macros in wiki pages
Last modified by Simon Urli on 2023/10/10
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -21,8 +21,10 @@ 21 21 * the macro author needs to have *admin* rights for a macro available in its *wiki* 22 22 * no special rights besides the obvious right to edit the page are needed for a macro available only to its author. 23 23 24 - Also, if the macro needs to use [protected API>http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting#HXWikiCoreAccess],the author of the macro will need to have programming rights. Note that, unlike thenormal behaviour of the programmingrights on includedpages, the macrowill always be executed with the rights of its author, and not with the rights of the author of thecalling document(theocumentusing the macro). Specifically, if the macro uses protectedAPI, only the macro author needs to have programming rights, not all the authors of the documents that call this macro.24 +1.1.1 Using protected API 25 25 26 +Also, if the macro needs to use [protected API>platform:DevGuide.Scripting#HXWikiCoreAccess], the author of the macro will need to have programming rights. Note that, unlike the normal behaviour of the programming rights on included pages, the macro will always be executed with the rights of its author, and not with the rights of the author of the calling document (the document using the macro). Specifically, if the macro uses protected API, only the macro author needs to have programming rights, not all the authors of the documents that call this macro. 27 + 26 26 1.1 Hello Macro 27 27 28 28 We are going to start with a very simple xwiki/2.0 wiki macro which prints a greeting message to the document content. It isn't a very useful macro but the idea is to get you familiarised with the wiki macro creation process.