mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #662 from wking/rich-urlwrapper-comparisons
contents: Add rich comparisons to URLWrapper for easy sorting
This commit is contained in:
commit
d9855ae346
4 changed files with 64 additions and 5 deletions
|
|
@ -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
|
||||
----------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue