Wiki source code of XWikiSyntaxMacros

Last modified by superadmin on 2025/05/22 17:44

Show last authors
1 = Programming =
2
3 == Macros ==
4
5 === 1.0 Macros ===
6
7 There are two kinds of macros in XWiki Syntax 1.0:
8
9 * Velocity macros (called using the ###macroname(param1 ... paramN)## syntax)
10 * Radeox macros (called using the ##{macroname:param1=value1|...|paramN=valueN}## syntax)
11
12 {{info}}
13 For the full list of available macros check the [[Extensions wiki>>https://extensions.xwiki.org/]].
14 {{/info}}
15
16 |=Feature|=XWiki Syntax 1.0
17 |Velocity Macro|(((
18 {{{#info("Some text")}}}
19 )))
20 |Radeox Macro|(((
21 {{{{code:java}
22 java content
23 {code}
24 }}}
25 )))
26
27 === 2.0 Macros ===
28
29 There is only one kind of macro in XWiki Syntax {{velocity}}$crtSyntaxVer{{/velocity}}, which is called by the syntax: ##{{{{{macroname param1="value1" ... paramN="valueN"}}...{{/macroname}}}}}##. For macros without content there's a short notation: ##{{{{{macroname param1="value1" ... paramN="valueN"/}}}}}##
30
31 |=Feature|=XWiki Syntax {{velocity}}$crtSyntaxVer{{/velocity}}|=Result
32 |Rendering Macro with a content|(((
33 {{{{{code language="java"}}
34 System.out.println("Hello World!");
35 {{/code}}
36 }}}
37 )))|{{code language="java"}}System.out.println("Hello World!");{{/code}}
38 |Rendering Macro without content|(((
39 {{{{{include reference="Space.Page"/}}}}}
40 )))|The referenced page is included in the current page
41
42 {{info}}
43 For the full list of available macros check the [[Extensions wiki>>https://extensions.xwiki.org/]].
44 {{/info}}
45
46 ==== Macros in this wiki ====
47
48 {{include reference="XWiki.XWikiSyntaxMacrosList"/}}