← Back to Download Manager Support
dj.reym0n28608
hello . I want to show the latest file that uploaded to each folder in main page . How can i do it ?
inetis
Hi,
You can do that simply by following category.files
relation.
By example, you can override browser/category.htm
component by adding the following :
{% set lastFile = category.files().orderByDesc('id').first %}
<a href="{{ url('/downloadmanager/download/' ~ category.id ~ '/' ~ lastFile.id ) }}">
{{ lastFile.title ?: lastFile.file_name }}
</a>
this is an example that need to be tested / improved
1-2 of 2