List of files-names with thumbnails (theme : quark)

I have a few files (odt and pdf, and images) in the page-folder of a ‘’ file (theme quark).
My file ‘subsection.html.twig’ is :

{% embed ‘sections.html.twig’ %}
{% endembed %}

So I put this code in the file ‘sections.html.twig’ :

{% for file in %}
    <div class="file-surround">
        {{|raw }}{{ file.meta.title }}
{% endfor %}

But it doesn’t work… Can someone give me a little help ?
Thank you !

I’m not at my Grav PC now, so not sure if html() produces the icon, but I believe you should call instead of|raw call simply file.html()|raw. Also I myself use - don’t know what returns actually. Also, you should define icons in media.yaml for missing file types (I believe odt is one of them)

Thank you, with “” it render something : a list of the files’ names.
But no link and no thumbnails…
And I don’t succeed in using the link() function.
What I want to get is a list of links with for each of them, a thumbnail corresponding to the type of the file…

Not sure what you’re missing. If you have defined file extension in media.yaml, it should work. I just tried on my page:

 {{|raw }}

And I’ve got linked thumbnail rendered on page :thinking:

You’re right, after deleted the .odt files and clear the cache, it works.
So is there a bug with odt files ?
In user/config/media.yaml, I write :

    type: file
    thumb: media/thumb-odt.png
    mime: application/vnd.oasis.opendocument.text

I’m a bit lost :slight_smile: If you say it works, what bug are you talking about? :slight_smile:

It seems to be all right (even with odt files).
I don’t understand, but the solution was to clear the cache “compiled/config”.
Thank you for your help.