Änderungen von Dokument Tip

Zuletzt geändert von xwikiadmin am 2025/05/21 09:23

Von Version 1.1
bearbeitet von xwikiadmin
am 2022/11/23 13:31
Änderungskommentar: Install extension [com.xwiki.pro:xwiki-pro-macros/1.6]
Auf Version 2.1
bearbeitet von xwikiadmin
am 2023/04/25 11:51
Änderungskommentar: Install extension [com.xwiki.pro:xwiki-pro-macros/1.7.1]

Zusammenfassung

Details

XWiki.WikiMacroClass[0]
Makro-Code
... ... @@ -1,4 +1,5 @@
1 -{{velocity}}
1 +{{velocity output="false"}}
2 +#macro (executeMacro)
2 2   {{success}}
3 3   #if("$!wikimacro.parameters.title" != "")
4 4   **$services.rendering.escape($wikimacro.parameters.title, $services.rendering.resolveSyntax($xwiki.getCurrentContentSyntaxId()))**
... ... @@ -6,4 +6,20 @@
6 6   #end
7 7   $!wikimacro.content
8 8   {{/success}}
10 +#end
9 9  {{/velocity}}
12 +
13 +{{include reference="Licenses.Code.VelocityMacros"/}}
14 +
15 +{{velocity}}
16 +## We need to check if there is a valid license because the macro is registered even if the user doesn't have view right
17 +## on the macro definition page. See XWIKI-14828: Rendering macros defined in wiki pages are available to users that
18 +## don't have view right on those pages.
19 +#if ($services.licensing.licensor.hasLicensureForEntity($xcontext.macro.doc.documentReference))
20 + #executeMacro
21 +#else
22 + {{error}}
23 + #getMissingLicenseMessage('proMacros.extension.name')
24 + {{/error}}
25 +#end
26 +{{/velocity}}