Änderungen von Dokument Column
Zuletzt geändert von xwikiadmin am 2023/10/26 10:38
Von Version 2.1
bearbeitet von xwikiadmin
am 2022/08/11 17:13
am 2022/08/11 17:13
Änderungskommentar:
Migrated property [defaultCategories] from class [XWiki.WikiMacroClass]
Auf Version 3.1
bearbeitet von xwikiadmin
am 2023/04/25 11:27
am 2023/04/25 11:27
Ä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,32 @@ 1 -{{velocity}} 2 -#set ($discard = $xwiki.ssx.use('Confluence.Macros.Column')) 3 -#set ($style = '') 4 -#set ($extraCssClass = 'withWidth') 5 -#if ("$!xcontext.macro.params.width" != '') 6 - #set ($style = "style='width: $xcontext.macro.params.width'") 7 -#end 8 -(% class="macro-column" $style %)((( 9 - ## Since 11.5 the content of the macro can be edited in WYSIWYG editor. 10 - #if ($services.rendering.getMacroDescriptor($services.rendering.resolveMacroId('wikimacrocontent'))) 11 - {{wikimacrocontent /}} 12 - #else 13 - $!xcontext.macro.content 1 +{{velocity output="false"}} 2 +#macro (executeMacro) 3 + #set ($discard = $xwiki.ssx.use('Confluence.Macros.Column')) 4 + #set ($style = '') 5 + #set ($extraCssClass = 'withWidth') 6 + #if ("$!xcontext.macro.params.width" != '') 7 + #set ($style = "style='width: $xcontext.macro.params.width'") 14 14 #end 15 -))) 9 + (% class="macro-column" $style %)((( 10 + ## Since 11.5 the content of the macro can be edited in WYSIWYG editor. 11 + #if ($services.rendering.getMacroDescriptor($services.rendering.resolveMacroId('wikimacrocontent'))) 12 + {{wikimacrocontent /}} 13 + #else 14 + $!xcontext.macro.content 15 + #end 16 + ))) 17 +#end 16 16 {{/velocity}} 19 + 20 +{{include reference="Licenses.Code.VelocityMacros"/}} 21 + 22 +{{velocity}} 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}} 32 +#end