sorting array passed to for?

15 views
Skip to first unread message

rb

unread,
Nov 26, 2009, 5:13:29 AM11/26/09
to Liquid Templates
Hi,

I have this code in my template:

{% for section in page.subsections %}
<li><a href="{{site.base_dir}}{{ section }}">{{section}}</
a></li>
{% endfor %}

but I'd need to sort the page.subsections. I've search and found there
is a sort filter, but this seems to be for output as
page.subsections.sort doesn't work in this case. Or am I doing
something wrong?

Thanks

Raphaël
Reply all
Reply to author
Forward
0 new messages