Attachment Picker Macro

Last modified by Admin on 2024/05/11 00:03

cogDisplay an attachment picker.
TypeJAR
CategoryMacro
Developed by

XWiki Development Team

Active Installs90
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard

Compatibility

14.4RC1+

Installable with the Extension Manager

Description

Provides a macro to search and select for an attachment. The results are presented in a grid.

Note: The results are retrieved from the document indexation. Not yet indexed content are not part of the returned search result.

Related widgets:

XWiki 14.10.1+, 15.0+ It is possible to select the search scope, either the current page only, or all viewable pages.
In addition, a warning is displayed to the user when the selected attachment is not from the current page.

Usage

{{attachmentGalleryPicker/}}

{{attachmentGalleryPicker id="myid"/}}

{{attachmentGalleryPicker filter="image/*"/}}

{{attachmentGalleryPicker limit="5"/}}

## Since 14.10.2/15.0-rc-1
{{attachmentGalleryPicker target="Space.Page"/}}

Parameters

NameOptionalAllowed valuesDefault valueDescription
idyesvalid syntax idN/AThe id of the rendered attachment picker
filteryesa comma separated list of mimetypesN/AThe mimetypes used to filter the displayed search results
limityesa positive integer20The number of results displayed to the user
XWiki 14.10.2+, 15.0+ targetyesA document referenceN/AThe document reference to use as the current page

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.platform:xwiki-platform-attachment-picker-macro 16.3.1):

Get Connected