<p>Both of these work:</p>

<pre><code>{% set sectionNamePages = craft.entries.section('sectionName').type('entryTypeA').level(1) %}
{% for page in sectionNamePages %}
    &lt;li class="{{ page.id == entry.id ? 'active' }}"&gt;{{ page.getLink() }}&lt;/li&gt;
{% endfor %}


{% set sectionNamePages = craft.entries.section('sectionName').level(1) %}
{% for page in sectionNamePages.type('entryTypeA') %}
    &lt;li class="{{ page.id == entry.id ? 'active' }}"&gt;{{ page.getLink() }}&lt;/li&gt;
{% endfor %}
</code></pre>

CC BY-SA 3.0
2018-03-01T09:58:47.057Z
2018-03-01T09:58:47.057Z
Andrew
<p>I couldn't find this anywhere so I thought I would post the answer. How do you limit the output of a navigation element to a specific entry type. </p>

<p>This question is explicitly for the navigation element - I only want to show a specific entry type in a navigation element.</p>

CC BY-SA 3.0
2018-03-01T10:17:49.010Z
Possible duplicate of [How do I display entries from multiple entry types?](https://craftcms.stackexchange.com/questions/2340/how-do-i-display-entries-from-multiple-entry-types)
Robin Schambach
<entries><elementcriteriamodel><entry-type>
How to limit navigation by entry type
# How to limit navigation by entry type

(Asked by: username_0 on 2018-03-01)

I couldn't find this anywhere so I thought I would post the answer. How do you limit the output of a navigation element to a specific entry type.

This question is explicitly for the navigation element - I only want to show a specific entry type in a navigation element.

**Tags:** entries, elementcriteriamodel, entry-type

> **Comments:**
> **username_1**: Possible duplicate of [How do I display entries from multiple entry types?](https://craftcms.stackexchange.com/questions/2340/how-do-i-display-entries-from-multiple-entry-types)  

---

## 1 answers

### Answer by username_0 on 2018-03-01. Score: 1

Both of these work:
{% set sectionNamePages = craft.entries.section('sectionName').type('entryTypeA').level(1) %}
{% for page in sectionNamePages %}
    {{ page.getLink() }}
{% endfor %}


{% set sectionNamePages = craft.entries.section('sectionName').level(1) %}
{% for page in sectionNamePages.type('entryTypeA') %}
    {{ page.getLink() }}
{% endfor %}


---

