Plugin

Files

file

The file function returns a decorated file instance by identifier. The parameter can be a file location, path, or id.

{{ file(1).name }}
{{ file('images/foo.jpg').name }}
{{ file('local://images/foo.jpg').name }}

{{ file('local://images/foo.jpg').make.fit(100, 100).inline|raw }}

Folders

folder

The folder function returns a decorated folder instance by identifier. The parameter can be a file slug or id.

{{ folder(1).name }}
{{ folder('images').name }}

{% for file in folder('images').files %}
    <a href="{{ file.route('download') }}">Download {{ file.name }}</a>
{% endfor %}