Attachment Table macro - Cloud

Attachment Table macro - Cloud

Overview

The Attachment Table macro produces a table of attachments based on various selection criteria, including space and page selection.

Further customization is possible by specifying filters to select attachments by name, comments, and labels. You can select and indicate the order of the columns in the table to be displayed based on column name or number. Refer to the Columns available to display section for details.

The resulting table can be customized and supports most common table capabilities.

Depending on the selection criteria used and a number of attachments, pages, and spaces that need to be processed, this could be a long running process. Choose your selection criteria carefully and consider using the Limit number of attachments to retrieve parameter described below to limit processing.

Basic use

This macro can be added to a page using any of the following methods:

Selected from the macro browser

Advanced Tables - Attachment Table

Markup shortcut (Old editor)

{attachment-table}

Markup shortcut (New editor - case insensitive)

/Attachment Table

Screenshot

See a live site creatively using the attachment-table macro

From vxvista.org: Recorded Webinars

Parameters

Refer to How to use regex expressions to select attachments to learn how to form the regular expressions with the parameters. 

Macro specific parameters

Macro Editor Label

Default

Description

Macro Parameter

Macro Editor Label

Default

Description

Macro Parameter

Page to list attachments from

Most recent attachment uploaded to the current page

Enter the location where the attachments are available. The following locations are supported:

  • page - Data is read from an attachment to the page specified here; provided that page is in the same space as the macro.

  • space:page - Data is read from an attachment to the specified page that is in the specified space.



Space key or space name regex



Enter a regular expression (regex) pattern to match with space keys or space names. Used in combination with the Page name regex parameter to select pages from which attachments are to be chosen. If left blank, the Page to list attachments from parameter is required.

The following options indicate:

  • @self - current space or page

  • @home - home page of current space

  • @parent - parent page of current page or space

It is possible that in page preview, before publishing for the first time, the result for @self and @parent are not displayed as expected. Once you save the document, you can view the result as expected.

spaceRegex

Include personal spaces

false

Enable to control whether personal spaces matching Space key or space name regex are to be included or not, to process and render attachments from the specified spaces.

includePersonalSpaces

Page name regex



Enter a regular expression (regex) pattern to match on page names (titles). Used in combination with the Space key or space name regex parameter to select pages from which attachments are to be chosen.

pageRegex

Page label regex



Enter a regular expression (regex) pattern to match on page labels. Used in combination with the Page name regex and Space key or space name regex parameters to select pages from which attachments are to be chosen. Pages must match with every selection criteria.

pageLabelRegex

Attachment name regex



Enter a regular expression (regex) pattern to match on attachment names. Used in combination with the Attachment comment regex and Attachment label regex parameters to select attachments. Attachment must match with every selection criteria.

attachmentRegex

Attachment comment regex



Enter a regular expression (regex) pattern to match on attachment comments. Used in combination with the Attachment name regex and Attachment label regex parameters to select attachments. Attachment must match with every selection criteria.

commentRegex

Attachment label regex



Enter a regular expression (regex) pattern to match on attachment labels. Used in combination with the Attachment name regex and Attachment comment regex parameters to select attachments. Attachment must match with every selection criteria. Matching technique is determined using the Label match option parameter.

labelRegex

Label match option

single

Specify the manner in which to apply the Attachment label regex parameter (for attachments) and the Page label regex parameter (for pages) when looking for matching labels. The options are:

  • single: An attachment, that has at least one label that matches the Page label regex or Attachment label regex pattern, is considered as selected.

  • allPage label regex and Attachment label regex are used to match a blank separated list of all labels.

labelMatchOption

Text to display when no attachments match



Enter the text to be displayed when no attachments are found that match the given search criteria. If left blank, no text is displayed if no attachments are found.

textForNone

Date format

Confluence default

Enter a date format to format the dates in the created and modified columns. Use a simple date format string.

dateFormat

Limit number of attachments to retrieve

1000

Enter the number of attachments that the macro must retrieve in total. Processing stops after the number of attachments found matching the selection criteria reaches the limit value. Space, page, and attachment processing is ordered by attachment name.

limit

Retrieve attachments from child pages

false

Enable this option to list the child page attachments of the specified page in Space and Page parameters in the Page filtering tab. By default, only the attachments on the specified page are displayed. 

This option works only if Single page is selected in Page filtering > Source.

fromAllChildPages

Common parameters

Columns available for display

The Attachment Table macro allows the user to select the columns to be displayed as well as the order in which the columns are to be displayed. A default set of columns is displayed unless an explicit list is provided. You can select and indicate the order in which columns are to be displayed based on their column name or number. Use the columns parameter to specify a comma separated list of column names or numbers.

The column names are case insensitive.

In most cases, the column heading can be used instead of the column name, but there are a few cases where that is ambiguous. In such a case, the first column matching the heading is used. 

Default columns for single page attachments

file, size, creator, created, comment

Default columns for multiple page attachments

page, file, size, creator, created, comment



Examples

Other macros

Below is a list of all other macros available within this app:

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.