<p>With a little help I got there:</p>

<pre><code>{% set categories = craft.categories.group('developmentType').id('not ' ~ category.id) %}
&lt;ul&gt;
{% for category in categories %}
    &lt;li&gt;&lt;a href="{{ category.url }}" class="btn"&gt;{{ category }} Opportunities&lt;/a&gt;&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;
</code></pre>

CC BY-SA 3.0
2015-07-03T16:00:27.100Z
2015-07-03T16:00:27.100Z
richardpixel
<p>In a template for a category page, I'm trying to output a list of links through to all categories within a category group but exclude the category that the user is on.</p>

<p>Does that make sense? What I'm trying doesn't work, but I'm new to Craft and Twig!</p>

<categories><category>
Display a list of categories excluding the current one
# Display a list of categories excluding the current one

(Asked by: username_0 on 2015-07-03)

In a template for a category page, I'm trying to output a list of links through to all categories within a category group but exclude the category that the user is on.

Does that make sense? What I'm trying doesn't work, but I'm new to Craft and Twig!

**Tags:** categories, category


---

## 1 answers

### Answer by username_0 on 2015-07-03. Score: 5

With a little help I got there:
{% set categories = craft.categories.group('developmentType').id('not ' ~ category.id) %}

{% for category in categories %}
    {{ category }} Opportunities
{% endfor %}


---

