Selecting categories by first letter I'm attempting to pull out a list of categories starting with certain letter(s).

What I've come up with so far seems a little excessive and I'm wondering if I've missed something obvious.

Can it all be done with just the 'craft.categories...' line?

{% set allCats = craft.categories.group('listingCategories').order('title').limit(null).find() %}
{% set allCatsByLetter = allCats|group('title | first') %}

{% for letter, allCats in allCatsByLetter if letter == "A" %}
    &lt;ul&gt;
        {% for cat in allCats %}
            &lt;li&gt;{{ cat.title }}&lt;/li&gt;
        {% endfor %}
    &lt;/ul&gt;
{% endfor %}
If you don't mind using the search parameter you could add it like this:

{% set beer = 'a' %}
{% set allCats = craft.categories.search('title:' ~ beer ~ '*').limit(null) %}