Skip to main content
Skip table of contents

Attachments

Parameter


Name

Description

Type

This is a required field

Default

Values

Filename patterns
patterns

A comma-separated list of filename regular expression patterns. Example: .*pdf

string

(error)



Style
mode

The display mode of the list. Sidebar = bullet-list

enum

(error)

full

full, sidebar

Sort by
sortBy

Specify the sort field for attachments. Valid values are date, size and name. The default sort order is reverse chronological (descending) for date, largest to smallest for size, and alphabetical for name. Note that people viewing the page can change the sort order by clicking on the column headings.

enum

(error)

date

date, size, name

New flag
newFlag

If a value is set, a new indicator will be displayed if the attachment was created within the last [newFlag] days.

string

(error)

0


Maximum
max

Maximum number of attachments to be displayed

string

(error)



Maximum length of the title
shortTitle

Maximum character length of the attachment titles. If a title is longer than this it will be truncated at the end of the word and "..." will be added.

int

(error)

35


ContentId
contentId

If the contentID of a page or blog is given, the macro displays the attachment list of the specified content object.

string

(error)



Show creation date
showCreationDate

Display the creation date of each attachment.

boolean

(error)

true


Show author
showCreator

Display the author of each attachment.

boolean

(error)

true


Show file size
showFilesize

Display file sizes in the list.

boolean

(error)

true


Show comment
showComment

Display comments.

boolean

(error)

true


Show actions
showActions

Show actions like properties and delete, if the user is permitted to exceute these actions.

boolean

(error)

true


Icon
icon

Sets an icon that will be displayed for each attachment, independent of file type.

enum

(error)


icon-page, icon-blog

Title from comment
titleFromComment

If set to true, comments are used as attachment title if not empty.

boolean

(error)

false


Examples

Filter Attachments by file name

CODE
{gu-attachmentlist:patterns=.*jpg,.*gif}

Use a comma-separated list of regular expressions to specify the file extensions of the type of attachments you want displayed.

Note

The patterns are regular expressions, so to match a file suffix of 'jpg', use .*jpg, not *.jpg.

Here's a detailed tutorial on regular expressions.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.