0

I have a result page where I want to divide the result presentation up in 2 different columns. One pulls out only stuff from channel 1, and the other one from channel 2,3,4 and 5.

I have tried the allow_repeats="yes", but none of the loops show any results.

However, if I remove one of the {exp:super_search:results} on the page, it works fine (for the {exp:super_search:results} that's still on the page that is.

Can't wrap my head around it >_<.

<section id="search">
<section class="container-wide">
    <!-- TOP CONTAINER -->
    <section class="search-article">
        <div class="column--twelve">
            <h5>resultat för sökningen efter</h5>
            <h1>"{super_search_keywords}"</h1>
        </div>

        <!-- VÄNSTER KOLUMN -->
        <div class="column--six-left">
            <div class="divider"><div><span>Produkter</span></div></div>
            <div class="search--result-products">
            <style>mark {background-color:#FFEB4F;}</style>
                {exp:super_search:results channel="produkter" highlight_keywords="mark" allow_repeats="yes"}
                {!-- loop 1 --}
                <div class="produkt">
                    <a href="{title_permalink='produkt'}">
                        {exp:ce_img:pair src="/assets/images/uploads/produkt_images/{produkt_huvudbild}" max="350" crop="yes"}
                            <img src="{made}" />
                        {/exp:ce_img:pair}
                    </a>
                    <h5><a href="{title_permalink='produkt'}">{varumrke}</a></h5>
                    <h2><a href="{title_permalink='produkt'}">{title}</a></h2>
                </div>
                {/exp:super_search:results}
            </div>
            <!--div>
                <div class="show--more"><div class="button"><a href="">Visa fler produkter</a></div></div>
            </div-->
        </div>
        <!-- END VÄNSTER KOLUMN -->

        <!-- HÖGER KOLUMN -->
        <section class="column--six-right">
            <div class="divider"><div><span>Beauty/Varumärke/Utbildningar</span></div></div>
            <div class="search--beauty-holder">
                {exp:super_search:results channel="beauty_k|beauty_l|beauty_li|utbildning|varumarke" highlight_keywords="mark" status="open" allow_repeats="yes"}
                 {!-- loop 2 --}
                {if channel_short_name == "beauty_k"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='beauty/artikel'}">
                                {exp:ce_img:pair src="{huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{liten_rubrik}</h5><h2><a href="{title_permalink='beauty/artikel'}">{title}</a></h2><p>{kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "beauty_l"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='beauty/artikel'}">
                                {exp:ce_img:pair src="{huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{liten_rubrik}</h5><h2><a href="{title_permalink='beauty/artikel'}">{title}</a></h2><p>{kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "beauty_li"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='beauty/artikel'}">
                                {exp:ce_img:pair src="{huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{liten_rubrik}</h5><h2><a href="{title_permalink='beauty/artikel'}">{title}</a></h2><p>{kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "utbildning"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='utbildning'}">
                                {exp:ce_img:pair src="{ut_huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{ut_liten_rubrik}</h5><h2><a href="{title_permalink='utbildning'}">{title}</a></h2><p>{ut_kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "varumarke"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='varumarke'}">
                                {exp:ce_img:pair src="{v_huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{v_liten_rubrik}</h5><h2><a href="{title_permalink='varumarke'}">{title}</a></h2><p>{v_ingress}</p></div>
                    </div>
                {/if}
                {/exp:super_search:results}
            </div>
            <!--div>
                <div class="show--more"><div class="button"><a href="">Visa mer från beauty</a></div></div>
            </div-->
        </section>
        <!-- END HÖGER KOLUMN -->

    </section>
    <!-- TOP CONTAINER -->
</section>

{embed="site/_banner-vert"}
{embed="site/_recomended"}

Any help would be greatly appreciated.

Using EE 2.10.x, so I'm not using the super search 3.0 version.

  • What version number of Super Search are you using? Have you tried clearing the Super Search cache and rebuilt the lexicon just in case? What does your search result URL look like, by the way? Also, try removing the CE Image tags just in case: they can be resource hungry sometimes. – Solspace Nov 3 '15 at 5:16
  • I'm using Super Search 2.2.3 for EE 2.x. Will try without CE Image now, let me get back. – Pontus Madsen Nov 3 '15 at 8:01
  • Tried without the CE Image, tried rebuilding, clearing all cache's, still no go. Search results look like this http://www.mysite.som/index2.php/search/results/search&keywords=Blommor/ ... Grateful for any help I can get. – Pontus Madsen Nov 3 '15 at 8:09
  • Is the above code ALL of your template code (anything else on the template or wrapping this template)? Have you tried doing the same thing using the Demo Templates that come with Super Search, eg. duplicate the {exp:super_search:results} code in super_search_main/keyword_results but with different channels? I tried that and both results displayed fine. Also, allow_repeats="" wouldn't do much because results should be coming from different channels. – Solspace Nov 6 '15 at 1:35
  • Also try to put a {if super_search_no_results}...{/if} conditional in there to see if at least that is outputting in both your {exp:super_search:results} tag pairs. – Solspace Nov 6 '15 at 1:37
1

Go to the preferences and turn off caching by setting the Refresh value from 10 minutes to 0 minutes. This solved all my problems (the ones that could be solved that is). So, yeah. That's how simple it was it seems.

Thanks to Mitchell from Solspace for pointing this out.

Also, allow_repeats="" should not be in there at all, just so you who are reading this since you had the same problem as I had knows that too.

| improve this answer | |
0

Try putting one of your SuperSearch loops in a template partial, and embed it.

http://ee2docs.com/templates/embedding.html

That should work just fine.

| improve this answer | |
  • Moved one of the loops out to a new template, and {embed="search/search_result_2"} ... but no, still getting nothing. Do I un-embed the stuff I lifted out, it works fine. – Pontus Madsen Nov 2 '15 at 22:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.