<p>You can fetch your categories on the front end using <a href="http://buildwithcraft.com/docs/templating/craft.categories">craft.categories</a>, which has a <a href="http://buildwithcraft.com/docs/templating/craft.categories#group">group param</a> that can be used to filter categories by a given group handle.</p>

<pre><code>{% set categories = craft.categories.group('myGroupHandle') %}
</code></pre>

<p>If the category group is limited to a single level, you can loop through those using a basic <a href="http://twig.sensiolabs.org/doc/tags/for.html">for-loop</a>:</p>

<pre><code>&lt;ul&gt;
    {% for category in categories %}
        &lt;li&gt;{{ category.title }}&lt;/li&gt;
    {% endfor %}
&lt;/ul&gt;
</code></pre>

<p>If the category group can be multi-level, you might be better off using the <a href="http://buildwithcraft.com/docs/templating/tags#nav">{% nav %} tag</a> instead:</p>

<pre><code>&lt;ul&gt;
    {% nav category in categories %}
        &lt;li&gt;
            {{ category.title }}

            {# Output a nested &lt;ul&gt; if this category has any children #}
            {% ifchildren %}
                &lt;ul&gt;{% children %}&lt;/ul&gt;
            {% endifchildren %}
        &lt;/li&gt;
    {% endnav %}
&lt;/ul&gt;
</code></pre>

CC BY-SA 3.0
2015-08-20T18:00:14.543Z
Set up on craft is through the settings, then category button. Not through category tab.
Matteo
CC BY-SA 3.0
2014-06-12T00:45:55.630Z
2014-06-12T00:45:55.630Z
Brandon Kelly
<p>I would like to output a list of all the categories in a category group on the front end. How do I do that?</p>

<categories><templating>
How do you list categories in a category group?
# How do you list categories in a category group?

(Asked by: username_0 on 2014-06-12)

I would like to output a list of all the categories in a category group on the front end. How do I do that?

**Tags:** categories, templating

---

## 1 answers

### Answer by username_1 on 2014-06-12. Score: 27 | Accepted answer

You can fetch your categories on the front end using craft.categories, which has a group param that can be used to filter categories by a given group handle.
{% set categories = craft.categories.group('myGroupHandle') %}

If the category group is limited to a single level, you can loop through those using a basic for-loop:

    {% for category in categories %}
        {{ category.title }}
    {% endfor %}


If the category group can be multi-level, you might be better off using the {% nav %} tag instead:

    {% nav category in categories %}
        
            {{ category.title }}

            {# Output a nested  if this category has any children #}
            {% ifchildren %}
                {% children %}
            {% endifchildren %}
        
    {% endnav %}

> **Comments:**
> **username_2**: Set up on craft is through the settings, then category button. Not through category tab.  

---

