Zuletzt geändert von xwikiadmin am 2024/06/24 15:04

Von Version 5.1
bearbeitet von xwikiadmin
am 2023/10/26 10:38
Änderungskommentar: Install extension [com.xwiki.pro:xwiki-pro-macros/1.12]
Auf Version 2.1
bearbeitet von xwikiadmin
am 2022/08/11 17:13
Änderungskommentar: Migrated property [defaultCategories] from class [XWiki.WikiMacroClass]

Zusammenfassung

Details

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