0

I am going to try my best to explain what I am trying to accomplish so I will be breaking this up into various parts.

WHAT I AM TRYING TO ACCOMPLISH:

Create a filtered list of search results into various lists. For example I want my filtered results to end up in SECTION A, SECTION B, SECTION C and so on. I will probably have 5 sections once all said and done.

Within each section I only want 3 articles to appear. I will then have a view more button to take the user to see a larger selection of entries.

HOW I AM SEARCHING MY CONTENT:

I currently have used Solspace's Tag module and tagged my articles as needed.

I then have a Super Search form searching my tags using checkboxes.

Then on my search result page I am using Stash to help me organize my entries into SECTION A, SECTION B and so on.

This is working as expected!

WHAT I AM HAVING ISSUES WITH:

My main issue at this point in time is limiting my search results per SECTION A, SECTION B and so on. I can limit my results per Super Search but that limit effects all sections meaning that I can only have 3 entries displaying across all SECTIONS combined. What I need is a total of 3 entries to be shown in each SECTION. I hope this makes sense.

Below is my sample code for my checkbox in the search form:

<label> &lt;input type="checkbox" name="our_tags[]" value="reg-link" {if super_search_our_tags_reg-link}checked="checked"{/if}&gt; Regional/Community Links </label>

Then in my search results page I have the following:

{exp:stash:set name="service-results" parse_tags="yes"}
    {exp:super_search:results channel="test" search_in="priority_tags|our_tags" orderby="test+desc+priority_tags+desc" search="limit=3"} 
        {exp:tag:tags entry_id="{entry_id}"} 
            {if {tag_id} == "21"} 
                <div style="background-color:#efefef"> 
                <h3>{title}</h3> 
                <p>Our Tags - {our_tags}</p> 
                <p>Priority Tags - {priority_tags}</p> 
                <p><a href="{path='articles/by_tag'}/tag/{websafe_tag}">{tag}</a>, </p> 
                <p><strong>{search_excerpt}</strong></p>     </div> 
           {/if} 
       {/exp:tag:tags} 
    {/exp:super_search:results} 
{/exp:stash:set}

I display my Stash output like so:

{exp:stash:get name="service-results"}

I have also attached a screen shot of my checkboxes and of the search result area. I hope these help explain a little more what I am trying to accomplish.

Any suggestions or help is greatly appreciated! If I need to provide additional information please let me know.

Thanks in advance,

John

enter image description hereenter image description here

1

Ended up creating tags for each of the form areas. Then using a jquery plug-in to help load in my information via ajax.

| improve this answer | |

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.