Skip to content
  1. Extras
  2. FileMan
  3. Snippets

Snippets

The component has one snippet: fmFiles.

fmFiles

Outputs the list of files attached to a resource.

pdoTools and Fenom support

Up to and including 3.1.5-pl, the component used pdoTools and a single chunk written with the Fenom templating engine.

From 3.2.0-pl onward it can work either with pdoTools (and Fenom) or with the standard MODX parser.

This is controlled by the fileman_pdotools system setting:

  • Setting on and pdoTools installed:
    fmFiles uses only the tpl parameter and the single chunk specified there. The chunk can (and should) use Fenom.
  • Setting off:
    fmFiles uses only tplRow, tplGroup, tplWrapper, wrapIfEmpty and their chunks. Chunks use standard MODX syntax.

Parameters

ParameterDefaultDescription
tpltpl.FileMan.FilesSingle chunk for the full result (Fenom). Used only when pdoTools is on.
tplRowtpl.FileMan.RowChunk for one file row (when fileman_pdotools is off). Placeholders: all fmFile fields.
tplGrouptpl.FileMan.GroupChunk for a group (when fileman_pdotools is off). Placeholders: [[+group]], [[+output]].
tplWrapperWrapper chunk for the result (when fileman_pdotools is off). Placeholder: [[+output]].
wrapIfEmpty0Whether to wrap an empty result in tplWrapper.
sortBysort_orderField to sort files by.
sortDirASCSort direction: ASC or DESC.
limit0Max number of results (0 = all).
offset0Offset for pagination (e.g. with pdoPage).
totalVartotalPlaceholder name for total file count when using pagination.
toPlaceholderSave result to this placeholder instead of outputting.
idsComma-separated list of file IDs to output.
resourceResource ID (default: current resource).
showGroups1Show file groups.
makeUrl1Generate download URLs for files.
privateUrl0Force private (connector) URLs for all files.
includeTimeStamp0Include file modification time (as timestamp).