---
name: "MojoMojo::Formatter::Dir"
section: "3pm"
platform: "linux"
package: "libmojomojo-perl"
version: "1.12+dfsg-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/MojoMojo::Formatter::Dir"
---

# MojoMojo::Formatter::Dir(3pm)

format local directory as XHTML

## NAME

MojoMojo::Formatter::Dir - format local directory as XHTML

## DESCRIPTION

This formatter will format the directory argument as XHTML. Usage:

```
    {{dir directory exclude=exclude_regex}}
```

For security reasons the directory must be include in 'whitelisting'. You can use path\_to(DIR) to describe directory in mojomojo.conf:

\<Formatter::Dir\>\
     prefix\_url /myfiles\
     whitelisting \_\_path\_to(uploads)\_\_ \</Formatter::Dir\>

## METHODS

- format\_content\_order

  Format order can be 1-99. The File formatter runs on 92.

- format\_content

  Calls the formatter. Takes a ref to the content as well as the context object.

- format

  Return the content formatted

- to\_xhtml

  Return Directory and files lists in xhtml

- checkdir

  Directory must be include in whitelisting

## SEE ALSO

MojoMojo

## AUTHORS

Daniel Brosseau \<dab@catapulse.org\>

## LICENSE

This module is licensed under the same terms as Perl itself.
