Confluence 5.0 has reached end of life
Check out the [latest version] of the documentation
Displays a list of attachments on a given page. For more information see Displaying a List of Attachments.
Code examples
The following examples are provided for advanced users who want to edit the underlying markup for a Confluence page.
Macro name: attachments
Macro body: None.
Parameter name | Required | Default | Parameter description and accepted values |
---|---|---|---|
old | No | false | Available values:
|
patterns | No | (None) | A comma-separated list of regular expressions, used to filter the attachments by file name. Note that the parameter values must be regular expressions. For example: |
sortBy | No | date | Available values:
|
page | No | The page on which the macro exists. | Page name, used to display attachments from another page. |
sortOrder | No | The default sort order is determined by the
| Available values:
|
labels | No | (None) | A comma-separated list of labels. Confluence will show only attachments that have all the labels specified. (The match is an AND, not an OR.) |
upload | No | false | Determines whether the list of attachments will include options allowing users to browse for, and attach, new files. |
preview | No | true | Determines whether a preview of the attached file appears when the item is expanded. |
Storage format example
<ac:structured-macro ac:name="attachments"> <ac:parameter ac:name="old">false</ac:parameter> <ac:parameter ac:name="patterns">.*png,.*jpg</ac:parameter> <ac:parameter ac:name="sortBy">name</ac:parameter> <ac:parameter ac:name="page"> <ac:link> <ri:page ri:content-title="My page about chocolate"/> </ac:link> </ac:parameter> <ac:parameter ac:name="sortOrder">descending</ac:parameter> <ac:parameter ac:name="labels">chocolate,cookies</ac:parameter> <ac:parameter ac:name="upload">false</ac:parameter> </ac:structured-macro>
Wiki markup example
{attachments:old=false|patterns=.*png,.*jpg|sortby=name|page=My page about chocolate|sortorder=descending|labels=chocolate,cookies|upload=false|preview=false}
Overview
Content Tools
Apps