<p>I'm working on a webshop with an advanced filter / search with multiple categories, entry types and fields and sorting options.</p>

<p><strong>Schematic URL</strong><br />
site.com/template/entry.type/category/?size=category OR category&amp;color=category AND category&amp;checkbox=yes</p>

<p><strong>Real world example</strong><br />
site.com/shop/woman/jeans/?size=s,m&amp;color=blue,red&amp;delivery=yes</p>

<p>What is the best way to show the entries? With search or relatedTo?</p>

<p><strong>This is what I have so far:</strong></p>

<pre><code>{% if craft.request.getSegment('3') is not null %}
    {% set kind_slug = craft.request.getSegment('3') %}

    {% set categoryParams = {
        group: 'kind',
        slug: kind_slug
    } %}

{% else %}
    {% set categoryParams = {
       all kinds
    } %}
{% endif %}

{% set kind = craft.categories(categoryParams).first() %}
{% set size = craft.request.getParam('size') %} #}
{% set color = craft.request.getParam('color') %} #}

{% set params = {
    section: 'product',
    type: craft.request.getSegment(2),
    relatedTo: kind AND size AND color
} %}

{% for entry in craft.entries(params).find() %}
    {{ entry.title }}   
{% endfor %}
</code></pre>

<p>I want the same functionality as this EE plugin: <br /><a href="http://www.ralphmedia.co.uk/reefine/demo_basic" rel="nofollow">http://www.ralphmedia.co.uk/reefine/demo_basic</a></p>

CC BY-SA 3.0
2014-08-25T17:57:04.883Z
Johannes, could you split this question into smaller parts please?
carlcs
CC BY-SA 3.0
2014-08-26T07:54:33.750Z
Is this better? Can't get is smaller.
Johannes Lamers
CC BY-SA 3.0
2014-08-26T19:15:59.203Z
@JohannesLamers try rephrasing the question? Are you asking if it possible to search Craft entries using Faceted search? [Faceted Search, Wikipedia](http://en.wikipedia.org/wiki/Faceted_search) I would love to know the answer to this as well but I think you are running into an issue because the question is too broad... I would pick search as your method and then ask a question that is directed along those lines. I am not a SE expert though so I could be wrong : )
Alan Miller
<entries><search><filter><segments><params>
Filter entries with segments and params based on categories and fields
# Filter entries with segments and params based on categories and fields

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

I'm working on a webshop with an advanced filter / search with multiple categories, entry types and fields and sorting options.
Schematic URL
site.com/template/entry.type/category/?size=category OR category&color=category AND category&checkbox=yes
Real world example
site.com/shop/woman/jeans/?size=s,m&color=blue,red&delivery=yes
What is the best way to show the entries? With search or relatedTo?
This is what I have so far:
{% if craft.request.getSegment('3') is not null %}
    {% set kind_slug = craft.request.getSegment('3') %}

    {% set categoryParams = {
        group: 'kind',
        slug: kind_slug
    } %}

{% else %}
    {% set categoryParams = {
       all kinds
    } %}
{% endif %}

{% set kind = craft.categories(categoryParams).first() %}
{% set size = craft.request.getParam('size') %} #}
{% set color = craft.request.getParam('color') %} #}

{% set params = {
    section: 'product',
    type: craft.request.getSegment(2),
    relatedTo: kind AND size AND color
} %}

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

I want the same functionality as this EE plugin: http://www.ralphmedia.co.uk/reefine/demo_basic

**Tags:** entries, search, filter, segments, params
> **Comments:**
> **username_1**: Johannes, could you split this question into smaller parts please?  
> **username_0**: Is this better? Can't get is smaller.  
> **username_2**: @JohannesLamers try rephrasing the question? Are you asking if it possible to search Craft entries using Faceted search? [Faceted Search, Wikipedia](http://en.wikipedia.org/wiki/Faceted_search) I would love to know the answer to this as well but I think you are running into an issue because the question is too broad... I would pick search as your method and then ask a question that is directed along those lines. I am not a SE expert though so I could be wrong : )  

---

## 0 answers

