Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
On this page
|
Overview
This page demonstrates how to use the the Attachment Table macro, which is part of the Advanced Tables for Confluence app app, to select attachments based on the Space space or attachment name, using a Regex regex expression.
- Use the special @self value for the spaceRegex parameter to match on all attachments in the current Spacespace.
- Use .*png|.*jpg to match on attachments whose name ends in png PNG or jpgJPG.
Macro
...
browser input
Select this
...
macro
Macro Namename | Advanced Tables - Attachment table |
Macro Syntaxsyntax | {attachment-table} |
Define these
...
parameters/
...
values
Attachment Table settings > Page filtering > Source (Regex) > Filter by page name | @self |
Attachment Table settings > Attachment filtering > Attachment name regex | .*png|.*jpg |
Screenshot
Wiki
...
markup input
Code Block | ||||
---|---|---|---|---|
| ||||
{attachment-table:spaceRegex=@self|attachmentRegex=.*png} |
Info |
---|
Confluence is more limited on parameter values. In this case, | (pipe - used for regex or)is a reserved character, so it cannot be used. |
...
Example result
Tip | ||
---|---|---|
| ||
The above example shows how to match on one label. Constructing a regex to match attachments that have 2 two or more specific labels is a bit more complicated.
|
Other
...
examples
Visit our full list of product examples for additional inspiration!