Code source wiki de Excerpt Macro
Modifié par Admin le 16/10/2025 - 23:33
Afficher les derniers auteurs
| author | version | line-number | content |
|---|---|---|---|
| 1 | = Description = | ||
| 2 | |||
| 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}}. | ||
| 4 | |||
| 5 | = Parameters = | ||
| 6 | |||
| 7 | |=Parameter|=Description|=Default | ||
| 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 | ||
| 9 | |**hidden**|If true, the content of the macro will be hidden.|false | ||
| 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 | ||
| 12 | |||
| 13 | = Example of usage = | ||
| 14 | |||
| 15 | Example of excerpt with a table in it: | ||
| 16 | |||
| 17 | {{code}} | ||
| 18 | {{excerpt}} | ||
| 19 | |=Title1|=Title2|=Title3 | ||
| 20 | |Text1|Text2|Text3 | ||
| 21 | {{/excerpt}} | ||
| 22 | {{/code}} | ||
| 23 | |||
| 24 | The result is the following: | ||
| 25 | |||
| 26 | {{excerpt}} | ||
| 27 | |=Title1|=Title2|=Title3 | ||
| 28 | |Text1|Text2|Text3 | ||
| 29 | {{/excerpt}} | ||
| 30 | |||
| 31 | Example of named hidden excerpt: | ||
| 32 | |||
| 33 | {{code}} | ||
| 34 | {{excerpt hidden="true" name="myexcerpt"}} | ||
| 35 | My hidden content. | ||
| 36 | {{/excerpt}} | ||
| 37 | {{/code}} | ||
| 38 | |||
| 39 | The result is the following: | ||
| 40 | |||
| 41 | {{excerpt hidden="true" name="myexcerpt"}} | ||
| 42 | My hidden content. | ||
| 43 | {{/excerpt}} | ||
| 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"/}} |