ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

What module for displaying search results from multiple channels ?

March 26, 2013 8:23am

Subscribe [3]
  • #1 / Mar 26, 2013 8:23am

    Monarobase

    77 posts

    Hello,

    I’m trying to do something that I find simple but ExpressionEngine doesn’t seem to be able to do.

    I want to do a multi channel search and display the results with correct links and be able to detect when an except is empty.

    Each channel has differents fields set as excerpt and some channels have seperate pages for each of their categories.

    I therefore need to be able to :

    Detect when an excerpt is empty not matter what field was set a excerpt field.
    Detect what channel and what category the article is in so I can give the correct URL.
    Access each article’s entry id in the search results

    These seem like obvious features that should exist… Do they exist ? If they do not what plugin should I buy to get these features ?

    I’ve checked out Super Search from Solspace but it says :

    {excerpt}
    This variable will behave just like it does in the native EE Search module.

    I don’t want to pay $119 if it has the same limitation as with EE’s built in search results… Does anyone know if super search will allow us to use conditions with the {excerpt} field ? :

    {if excerpt}{excerpt}{/if}

     

  • #2 / Mar 26, 2013 9:23am

    Riverboy

    2993 posts

    Im not sure what are you after, but as far as it goes for me, my simple search form do search within all channels. And to pull out right URL for all results, you just need to set those up in the channel settings.

    What i use is simple as this:

    {exp:search:simple_form search_in="entries" channel="not support" no_result_page="template_group/no_results" result_page="template_group/results"}

    As you can see, i do not want search to find anything from my support system that i have built using channel. so therefore there is channel=“not support” in my codes. It will ignore then that channel but search all others.

    I dont know about the excerpt you are talking about and such, but search will find all from all channels.

  • #3 / Mar 26, 2013 9:36am

    Monarobase

    77 posts

    I’ve just purchased the Solspace plugin to see if it does what I’m looking for…

    My issue here is that I want to search in a site/news template that contains one channel and multiple categories and in the following templates activities/activity1 activities/activity2 activities/activity3 activities/activity4

    Each activity template shows the articles from within a channel called activites that has 4 categories (activity1, activity2, activity3, activity4)

    What I’m hoping to achieve is the following code :

    <div class="result-item">
         <h2>Article title</h2>
    <p>    Page : Activities > activity1<br />
        {if excerpt}{excerpt}{/if}<br />
    </div><br />
    <div class="result-item"><br />
        </p><h2>Article title 2</h2>
    <p>    Page : News<br />
        {if excerpt}{excerpt}{/if}<br />
    </div><br />
    <div class="result-item"><br />
        </p><h2>Article title 3</h2>
    <p>    Page : Activities > activity 4<br />
        {if excerpt}{excerpt}{/if}<br />
    </div>

  • #4 / Mar 26, 2013 9:55am

    Riverboy

    2993 posts

    So you want to limit search to 2 different channels and their categories, right?
    If so, its simple (search will find categories too):

    {exp:search:simple_form search_in="entries" channel="channel_one|channel_two" no_result_page="template_group/no_results" result_page="template_group/results"}

    that code will search within the entries.
    To find out more about that parameter:
    http://ellislab.com/expressionengine/user-guide/modules/search/simple.html#id21

  • #5 / Mar 26, 2013 10:39am

    Monarobase

    77 posts

    How would I get the URLs to work :

    For activities I’ve got 4 URL’s :

    /activities/activity1/article-2
    /activities/activity2/article-4
    /activities/activity3/article-9
    /activities/activity4/article-5

    For news I’ve got 1 URL :

    /news/news-1

    It’s not limiting the results the problem but displaying them.

  • #6 / Mar 26, 2013 2:09pm

    Rob Allen

    3114 posts

    Use the auto_path variable in your search results template

    <a href="http://{auto_path}">{title}</a>

    Make sure you have set up the Search Results URL values in each Channels preferences, the search page will then use these values to build links to the correct place.

  • #7 / Mar 26, 2013 2:10pm

    Monarobase

    77 posts

    The Solspace SuperSearch module was the solution to what we needed to do, but I would still be interested to know how we are supposed to be able to achieve this without buying a plugin and why it doesn’t work out of the box with Expression Engine. Maybe I’ve been trying to do this the wrong way but if Solspace can make the search function variables work like in a channel entry, why can’t Expression Engine do this on it’s own (concidering we don’t need any of the advanced options the Solspace Super Search plugin provides and we just use it in the way we thought Expression Engine search would work :(

  • #8 / Mar 26, 2013 2:12pm

    Monarobase

    77 posts

    Use the auto_path variable in your search results template

    <a href="http://{auto_path}">{title}</a>

    Make sure you have set up the Search Results URL values in each Channels preferences, the search page will then use these values to build links to the correct place.

    Can I tell Expression Engine that a channel has four different pages, one for each category ?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases