Answers.Body: <p>If you don't mind using the search parameter you could add it like this:</p>
  
  <pre><code>{% set beer = 'a' %}
  {% set allCats = craft.categories.search('title:' ~ beer ~ '*').limit(null) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-17T17:57:33.783Z
Answers.Text: Upvoted for your use of 'beer'.
Answers.UserDisplayName: Steve Abraham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-17T17:35:11.217Z
Answers.LastActivityDate: 2014-11-17T17:35:11.217Z
Answers.UserDisplayName: carlcs
Body: <p>I'm attempting to pull out a list of categories starting with certain letter(s).</p>
  
  <p>What I've come up with so far seems a little excessive and I'm wondering if I've missed something obvious.</p>
  
  <p>Can it all be done with just the 'craft.categories...' line?</p>
  
  <pre><code>{% 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 %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-17T17:41:29.913Z
Comments.Text: I like this approach better then mine using search, Steve!
Comments.UserDisplayName: carlcs
Tags: <templating><categories><array>
Title: Selecting categories by first letter
ThreadText: # Selecting categories by first letter
  
  (Asked by: username_0 on 2014-11-17)
  
  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" %}
      <ul>
          {% for cat in allCats %}
              <li>{{ cat.title }}</li>
          {% endfor %}
      </ul>
  {% endfor %}
  
  ```
  
  **Tags:** templating, categories, array
  
  > **Comments:**
  > **username_1**: I like this approach better then mine using search, username_0!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-11-17. Score: 2
  
  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) %}
  
  ```
  
  > **Comments:**
  > **username_0**: Upvoted for your use of 'beer'.  
  
  ---
  
  