kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 132 forks source link

possible to display assets in name order rather than grouped by filetype? #126

Closed ghost closed 10 years ago

ghost commented 10 years ago

Is there any way to make this worK?

eg. if i have 01.jpg, 02.mov, 03.jpg, 04.html in a project folder can they display in that order rather than lumping the images together?

many thanks.

o-l-e commented 10 years ago

i ran into a similar thing, and got this working thanks to @mjau-mjau.

Try this:

{% for asset in page.files %}
    {{asset.file_name}} <br />
{% endfor %}

you could also try to exclude the text-file if you need to (change .txt to .yml if needed)

{% for asset in page.files if ".txt" not in asset.url %}
    {{asset.file_name}} <br />
{% endfor %}

Good luck!

o-l-e commented 10 years ago

@luckystairs did this work for you? If so, close the issue ;)

ghost commented 10 years ago

Yes – thanks. Put me on the right track. Crash course in twig and a bit of reworking the template files.