From 656b5150ff26988d71d41fb32f2f75aeca665617 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 15 Jan 2013 16:32:11 -0500 Subject: [PATCH] docs/themes.rst: Document URLWrapper sorting for use in Jinja templates --- docs/themes.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/themes.rst b/docs/themes.rst index 664b4466..19fd9274 100644 --- a/docs/themes.rst +++ b/docs/themes.rst @@ -68,6 +68,19 @@ categories A list of (category, articles) tuples, containing pages The list of pages ============= =================================================== +Sorting +------- + +URL wrappers (currently categories, tags, and authors), have +comparison methods that allow them to be easily sorted by name: + + {% for tag, articles in tags|sort %} + +If you want to sort based on different criteria, `Jinja's sort +command`__ has a number of options. + +__ http://jinja.pocoo.org/docs/templates/#sort + index.html ----------