Wiki-Quellcode von Excerpt Macro

Zuletzt geändert von xwikiadmin am 2025/01/07 11:39

Verstecke letzte Bearbeiter
xwikiadmin 1.1 1 = Description =
2
xwikiadmin 6.1 3 The Excerpt macro is a bridge between Confluence and XWiki. It allows the user to mark part of the page's content for use by other macros, for instance {{code language="none"}}{{excerpt-include}}{{/code}}.
xwikiadmin 1.1 4
5 = Parameters =
6
7 |=Parameter|=Description|=Default
xwikiadmin 6.1 8 |**atlassian-macro-output-type**|The ouput type. It can be either BLOCK or INLINE. Here for historical reasons and won't be shown in the macro editor.|INLINE
xwikiadmin 1.1 9 |**hidden**|If true, the content of the macro will be hidden.|false
xwikiadmin 5.1 10 |**name**|The name of the excerpt, for named includes.|false
11 |**allowUnprivilegedInclude**|Allow this excerpt to be seen even for people who don't have view rights on this page when included|false
xwikiadmin 1.1 12
13 = Example of usage =
14
xwikiadmin 5.1 15 Example of excerpt with a table in it:
xwikiadmin 1.1 16
17 {{code}}
18 {{excerpt}}
19 |=Title1|=Title2|=Title3
20 |Text1|Text2|Text3
21 {{/excerpt}}
22 {{/code}}
23
xwikiadmin 5.1 24 The result is the following:
xwikiadmin 1.1 25
26 {{excerpt}}
27 |=Title1|=Title2|=Title3
28 |Text1|Text2|Text3
29 {{/excerpt}}
30
xwikiadmin 5.1 31 Example of named hidden excerpt:
xwikiadmin 1.1 32
33 {{code}}
xwikiadmin 5.1 34 {{excerpt hidden="true" name="myexcerpt"}}
xwikiadmin 1.1 35 My hidden content.
36 {{/excerpt}}
37 {{/code}}
38
xwikiadmin 5.1 39 The result is the following:
xwikiadmin 1.1 40
xwikiadmin 5.1 41 {{excerpt hidden="true" name="myexcerpt"}}
xwikiadmin 1.1 42 My hidden content.
43 {{/excerpt}}
xwikiadmin 5.1 44
45 (yes, nothing, this is intended!)
46
47 Let's include this hidden excerpt:
48
49 {{code}}
50 {{excerpt-include 0="Excerpt" name="myexcerpt"/}}
51 {{/code}}
52
53 Result:
54
55 {{excerpt-include 0="Excerpt" name="myexcerpt"/}}
56
57 Without the panel:
58
59 {{code}}
60 {{excerpt-include 0="Excerpt" name="myexcerpt" nopanel="true"/}}
61 {{/code}}
62
63 Result:
64
65 {{excerpt-include 0="Excerpt" name="myexcerpt" nopanel="true"/}}