List Categories by 0-9 and A-Z I'm trying to output a list of Brand names grouped by first letter. But some items have a number or symbol in the name. I want to list first the Numbers and symbols under 0-9 and the rest of the brands under A-Z

Like this:

0-9


+People
10 Days
2Two
40 Weft
55 DSL
81hours


A


Acne
Adidas


B


B.Young
etc etc.
To group by the first letter you would simply use the slice filter within Craft's group
filter.

For all non letter characters you can now use Craft's replace filter (it does regex since Craft 2.2)
and replace them with whatever you want these entries to be sorted by.

{% set entriesGrouped = entries|group('title|slice(0, 1)|upper|replace("/[^A-Z]/", "0-9")') %}

{% for letter, entriesInGroup in entriesGrouped %}
    {{ letter }}
    {% for entry in entriesInGroup %}
        {{ entry.title }}
    {% endfor %}
{% endfor %}