DOKK / manpages / debian 10 / libmojomojo-perl / MojoMojo::Formatter::Dir.3pm.en
MojoMojo::Formatter::Dir(3pm) User Contributed Perl Documentation MojoMojo::Formatter::Dir(3pm)

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

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>

Format order can be 1-99. The File formatter runs on 92.
Calls the formatter. Takes a ref to the content as well as the context object.
Return the content formatted
Return Directory and files lists in xhtml
Directory must be include in whitelisting

MojoMojo

Daniel Brosseau <dab@catapulse.org>

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

2018-01-13 perl v5.26.1