Wiki-Quellcode von Attachments
Zuletzt geändert von xwikiadmin am 2025/05/21 09:22
Zeige letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| 1 | The Attachment macro is a bridge between Confluence and XWiki. It uses the XWiki implementation to display attachments in the page content. There are two things to note: | ||
| 2 | |||
| 3 | Not every parameters supported by the Confluence macro are supported by this bridge macro. The remaining parameters are ignored: | ||
| 4 | |||
| 5 | * {{{ labels }}} is not supported since XWiki does not support attachment tags | ||
| 6 | * {{{ preview }}} does not make sense for the XWiki macro as attachments are displayed differently | ||
| 7 | * {{{ old }}} has not been implemented in this bridge macro because it does not make really sense for XWiki | ||
| 8 | * {{{ "created date" }}} value of the {{{ sortBy }}} property behave the same way as the {{{ "date" }}} value | ||
| 9 | |||
| 10 | = Parameters = | ||
| 11 | |||
| 12 | |=Parameter|=Description|=Required|=Default | ||
| 13 | |**patterns**|Comma-separated list of regular expressions, used to filter attachments by name.|No| | ||
| 14 | |**sortBy**|Sort attachments by {{{ date }}}, {{{ size }}} or {{{ name }}}|No|{{{ date }}} | ||
| 15 | |**sortOrder**|Sort attachments in {{{ ascending }}} or {{{ descending }}} order|No|{{{ ascending }}} | ||
| 16 | |**upload**|Allow users to attach new files|No|{{{ true }}} | ||
| 17 | |**page**|Pages containing the attachments to display. Current page if empty.|No| | ||
| 18 | |||
| 19 | = Example Usage = | ||
| 20 | |||
| 21 | |||
| 22 | {{code}} | ||
| 23 | {{confluence_attachments | ||
| 24 | patterns=".*png" | ||
| 25 | sortBy="name" | ||
| 26 | /}} | ||
| 27 | {{/code}} |