Jump to main content Jump to doc navigation

What is FileLister?

FileLister is a dynamic file listing Extra for MODX Revolution. It allows you to list files within a directory, as well as securely browse through subdirectories.


  • MODX Revolution 2.0.0-rc-2 or later
  • PHP5 or later

Historyand Info

FileLister was written by Shaun McCormick (splittingred) as a dynamic file listing component, and first released on June 30th, 2010.


It can be downloaded from within the MODX Revolution manager via Package Management, or from the MODX Extras Repository, available here: https://modx.com/extras/package/filelister

Development and Bug Reporting

FileLister is stored and developed in GitHub, and can be found here: http://github.com/splittingred/FileLister


FileLister can be called via the Snippet tags, and passing a 'path' argument.


FileLister comes with one snippet:

System Settings

Name Description
filelister.salt A custom salt for the navigation.


List all the files and directories in assets/downloads.

[[!FileLister? &path=`assets/downloads/`]]

List only files in the 'assets/pdfs' directory.

[[!FileLister? &path=`assets/pdfs/`]]

List all files and subdirectories in '/docs/marketing', but don't allow file viewing or downloading except for users logged in and in the 'Marketing' or 'CEO' groups.

[[!FileLister? &path=`/docs/marketing/` &allowDownloadGroups=`Marketing,CEO`]]

Restrict file listings in 'assets/pdfs' to only PDF files:

[[!FileLister? &path=`assets/pdfs/` &hideDirectories=`1` &showExt=`pdf`]]

Sample Resource Content

This is a sample of HTML that you can put inside a Resource to output your content. You'll need to have the toPlaceholder property set to 'files' for this to work, and call your FileLister snippet uncached before this HTML.


<p>Current Path: <span>[[+filelister.path]]</span></p>

            <th>Last Modified</th>
            <th colspan="3">
                Files: [[+filelister.total.files]] | Directories:


See Also

  1. FileLister.FileLister
    1. FileLister.FileLister.directoryTpl
    2. FileLister.FileLister.fileLinkTpl
    3. FileLister.FileLister.fileTpl
    4. FileLister.FileLister.pathTpl