Änderungen von Dokument Section
Zuletzt geändert von xwikiadmin am 2023/10/26 09:30
Von Version 4.1
bearbeitet von xwikiadmin
am 2023/10/26 09:30
am 2023/10/26 09:30
Änderungskommentar:
Migrated property [type] from class [XWiki.WikiMacroParameterClass]
Auf 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]
Zusammenfassung
-
Objekte (1 geändert, 0 hinzugefügt, 0 gelöscht)
Details
- XWiki.WikiMacroClass[0]
-
- Makro-Code
-
... ... @@ -1,34 +23,17 @@ 1 -{{velocity output="false"}} 2 -#macro (executeMacro) 3 - #set ($discard = $xwiki.ssx.use('Confluence.Macros.Section')) 4 - #set ($discard = $xwiki.jsx.use('Confluence.Macros.Section')) 5 - #set ($hasBorder = "$!xcontext.macro.params.border") 6 - #set ($extraClass = '') 7 - #if ($hasBorder == 'true') 8 - #set ($extraClass = 'hasBorder') 9 - #end 10 - (% class="macro-section $extraClass" %)((( 11 - ## Since 11.5 the content of the macro can be edited in WYSIWYG editor. 12 - #if ($services.rendering.getMacroDescriptor($services.rendering.resolveMacroId('wikimacrocontent'))) 13 - {{wikimacrocontent /}} 14 - #else 15 - $!xcontext.macro.content 16 - #end 17 - ))) 18 -#end 19 -{{/velocity}} 20 - 21 -{{include reference="Licenses.Code.VelocityMacros"/}} 22 - 23 23 {{velocity}} 24 -## We need to check if there is a valid license because the macro is registered even if the user doesn't have view right 25 -## on the macro definition page. See XWIKI-14828: Rendering macros defined in wiki pages are available to users that 26 -## don't have view right on those pages. 27 -#if ($services.licensing.licensor.hasLicensureForEntity($xcontext.macro.doc.documentReference)) 28 - #executeMacro 29 -#else 30 - {{error}} 31 - #getMissingLicenseMessage('proMacros.extension.name') 32 - {{/error}} 2 +#set ($discard = $xwiki.ssx.use('Confluence.Macros.Section')) 3 +#set ($discard = $xwiki.jsx.use('Confluence.Macros.Section')) 4 +#set ($hasBorder = "$!xcontext.macro.params.border") 5 +#set ($extraClass = '') 6 +#if ($hasBorder == 'true') 7 + #set ($extraClass = 'hasBorder') 33 33 #end 9 +(% class="macro-section $extraClass" %)((( 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 +))) 34 34 {{/velocity}}