<p>Sure it's possible. There's the <a href="http://buildwithcraft.com/docs/templating/craft.entries#type" rel="nofollow"><code>type()</code></a> parameter available for ElementCriteriaModels to filter the returned results by only those entry types you need.</p>

<p>To separate the categories, I'd set up multiple <a href="http://buildwithcraft.com/docs/categories#category-groups" rel="nofollow">category groups</a>, one for each of your entry types.</p>

<p>For example:</p>

<pre><code>{% set categoryParams = {
    group: 'audioCategories',
    slug: 'podcasts'
} %}

{% set category = craft.categories(categoryParams).first() %}
{% set searchTerm = 'basketball OR soccer' %}

{% set entryParams = {
    section: 'news',
    type: 'audio',
    relatedTo: category,
    search: searchTerm
} %}

{% for entry in craft.entries(entryParams) %}
    &lt;li&gt;{{ entry.title }}&lt;/li&gt;
{% endfor %} 
</code></pre>

<p>This would list only those entries which are</p>

<ol>
<li>in a <strong>section</strong> named "news"<br></li>
<li>given an <strong>entry type</strong> (and entry template) "audio"<br></li>
<li>related to a category from the <strong>category group</strong> "audioCategories" (I additionally filter for just the one cat. named "podcasts" to keep the example a little simpler)<br></li>
<li>matching to the <strong>search term</strong> "basketball OR soccer"</li>
</ol>

CC BY-SA 3.0
2014-08-15T12:23:30.387Z
2014-08-15T12:40:30.673Z
2014-08-15T12:40:30.673Z
carlcs
<p>I have an entry type whose content will be separated from the main content. So I was wondering how can we give an entry type its own search and categories? Possible?</p>

<categories><entry-type><search>
How can an entry type have its own search and categories?
# How can an entry type have its own search and categories?

(Asked by: username_0 on 2014-08-15)

I have an entry type whose content will be separated from the main content. So I was wondering how can we give an entry type its own search and categories? Possible?

**Tags:** categories, entry-type, search


---

## 1 answers

### Answer by username_1 on 2014-08-15. Score: 3

Sure it's possible. There's the type() parameter available for ElementCriteriaModels to filter the returned results by only those entry types you need.
To separate the categories, I'd set up multiple category groups, one for each of your entry types.
For example:
{% set categoryParams = {
    group: 'audioCategories',
    slug: 'podcasts'
} %}

{% set category = craft.categories(categoryParams).first() %}
{% set searchTerm = 'basketball OR soccer' %}

{% set entryParams = {
    section: 'news',
    type: 'audio',
    relatedTo: category,
    search: searchTerm
} %}

{% for entry in craft.entries(entryParams) %}
    {{ entry.title }}
{% endfor %} 

This would list only those entries which are

in a section named "news"
given an entry type (and entry template) "audio"
related to a category from the category group "audioCategories" (I additionally filter for just the one cat. named "podcasts" to keep the example a little simpler)
matching to the search term "basketball OR soccer"


---

