djangosnippets.org: Latest snippets tagged with 'anchor'https://djangosnippets.org/tags/anchor/2007-08-17T10:32:40.152311-05:00Template tag to sort a list of links
2007-08-17T10:32:40.152311-05:00pytechdhttps://djangosnippets.org/snippets/372/<p>Sorts a list of HTML anchor tags based on the anchor's contents. This is useful, for example, when combining a static list of links with a dynamic list that needs to be sorted alphabetically. It ignores all attributes of the HTML anchor.</p>
<pre><code>{% load anchorsort %}
{% anchorsort %}
<a …</code></pre>
Freely redistributable