Wiki-Quellcode von Excerpt Macro
Version 4.1 von xwikiadmin am 2024/06/24 14:50
Verstecke letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | = Description = |
| 2 | |||
| |
4.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 exemple {excerpt-include}}. |
| |
1.1 | 4 | |
| 5 | = Parameters = | ||
| 6 | |||
| 7 | |=Parameter|=Description|=Default | ||
| 8 | |**atlassian-macro-output-type**|The ouput type. It can be either BLOCK or INLINE.|INLINE | ||
| 9 | |**hidden**|If true, the content of the macro will be hidden.|false | ||
| |
4.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 | ||
| |
1.1 | 12 | |
| 13 | = Example of usage = | ||
| 14 | |||
| |
4.1 | 15 | Example of excerpt with a table in it: |
| |
1.1 | 16 | |
| 17 | {{code}} | ||
| 18 | {{excerpt}} | ||
| 19 | |=Title1|=Title2|=Title3 | ||
| 20 | |Text1|Text2|Text3 | ||
| 21 | {{/excerpt}} | ||
| 22 | {{/code}} | ||
| 23 | |||
| |
4.1 | 24 | The result is the following: |
| |
1.1 | 25 | |
| 26 | {{excerpt}} | ||
| 27 | |=Title1|=Title2|=Title3 | ||
| 28 | |Text1|Text2|Text3 | ||
| 29 | {{/excerpt}} | ||
| 30 | |||
| |
4.1 | 31 | Example of named hidden excerpt: |
| |
1.1 | 32 | |
| 33 | {{code}} | ||
| |
4.1 | 34 | {{excerpt hidden="true" name="myexcerpt"}} |
| |
1.1 | 35 | My hidden content. |
| 36 | {{/excerpt}} | ||
| 37 | {{/code}} | ||
| 38 | |||
| |
4.1 | 39 | The result is the following: |
| |
1.1 | 40 | |
| |
4.1 | 41 | {{excerpt hidden="true" name="myexcerpt"}} |
| |
1.1 | 42 | My hidden content. |
| 43 | {{/excerpt}} | ||
| |
4.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"/}} |