I have a custom module. One of the fields is of type File, and the “File type” is Document. The field is called resources and is repeating.
If I write the following, I get a list of resources, but only the URL is displayed:
<ul>
{% for resource in module.resources %}
<li><a href="{{ resource }}">{{ resource }}</a></li>
{% endfor %}
</ul>
But I’d like to make use of the document name as well as its URL. Ideally something like:
<ul>
{% for resource in module.resources %}
<li><a href="{{ resource.url }}">{{ resource.name }}</a></li>
{% endfor %}
</ul>
But url and name (or title) aren’t recognized properties of resource.
Is this possible?