Änderungen von Dokument Excerpt Macro
Zuletzt geändert von xwikiadmin am 2025/01/07 11:39
Von Version 1.1
bearbeitet von xwikiadmin
am 2022/02/23 10:52
am 2022/02/23 10:52
Änderungskommentar:
Install extension [com.xwiki.pro:xwiki-pro-macros/1.2.1]
Auf Version 3.1
bearbeitet von xwikiadmin
am 2023/04/25 10:54
am 2023/04/25 10:54
Änderungskommentar:
Install extension [com.xwiki.pro:xwiki-pro-macros/1.7.1]
Zusammenfassung
-
Objekte (1 geändert, 0 hinzugefügt, 0 gelöscht)
Details
- XWiki.WikiMacroClass[0]
-
- Makro-Code
-
... ... @@ -1,16 +1,33 @@ 1 +{{velocity output="false"}} 2 +#macro (executeMacro) 3 + ## BLOCK / INLINE 4 + #set($outputType = $wikimacro.parameters.get('atlassian-macro-output-type')) 5 + #set($hidden = $wikimacro.parameters.get('hidden')) 6 + #set($displayAsBlock = "$!outputType" != '' && $outputType.toLowerCase() == 'block') 7 + #if("$!hidden" == 'true') 8 + (% class="hidden" %) 9 + #end 10 + #if($displayAsBlock) 11 + ((( 12 + #end 13 + {{wikimacrocontent /}} 14 + #if($displayAsBlock) 15 + ))) 16 + #end 17 +#end 18 +{{/velocity}} 19 + 20 +{{include reference="Licenses.Code.VelocityMacros"/}} 21 + 1 1 {{velocity}} 2 -## BLOCK / INLINE 3 -#set($outputType = $wikimacro.parameters.get('atlassian-macro-output-type')) 4 -#set($hidden = $wikimacro.parameters.get('hidden')) 5 -#set($displayAsBlock = "$!outoutType" == '' && $outputType.toLowerCase() == 'block') 6 -#if("$!hidden" == 'true') 7 - (% class="hidden" %) 23 +## We need to check if there is a valid license because the macro is registered even if the user doesn't have view right 24 +## on the macro definition page. See XWIKI-14828: Rendering macros defined in wiki pages are available to users that 25 +## don't have view right on those pages. 26 +#if ($services.licensing.licensor.hasLicensureForEntity($xcontext.macro.doc.documentReference)) 27 + #executeMacro 28 +#else 29 + {{error}} 30 + #getMissingLicenseMessage('proMacros.extension.name') 31 + {{/error}} 8 8 #end 9 -#if($displayAsBlock) 10 - ((( 11 -#end 12 - $xcontext.macro.content 13 -#if($displayAsBlock) 14 - ))) 15 -#end 16 16 {{/velocity}} - Makroinhaltstyp
-
... ... @@ -1,0 +1,1 @@ 1 +Wiki