We display all the entries on our site using a Super Search loop inside an embed called results.html which we embed on the main page on our site. These display our posts by default, instead of using a standard channel entries tag... (I think we originally took this approach as we were using AJAX searching, but we have since abandoned this and are just using standard searching now).
We're trying to make Super Search search multiple channels (Teachers, Schools and Zoo Visitor), but we only want to display results for two of these channels (Schools and Zoo Visitor) when keywords are being searched for. This is because we don't want to have a list of posts populated by the less important content from these channels, but we still want to keep the channels searchable.
We have managed to get this working by using the setup outlined below, and more specifically, the following condition allows us to detect if keywords have been searched for and
{if:elseif channel_name == 'schools' && segment_2 == "search&keywords={super_search_keywords}"}
and
{if:elseif channel_name == 'zoo_visitor' && segment_2 == "search&keywords={super_search_keywords}"}
This is working! However, at the last hurdle, we're running into a final problem where we get blank results when no search has been run (i.e. keywords). It seems the channels which we are ignoring when no search has been run because of the condition above (Schools and Zoo Visitor), seem to be being counted in the pagination.
So our first page of results contains one entry and then the second page has a whole load of entries from the Teacher channel etc...
How can we get round this and stop these channel results being counted in the pagination?
Thanks for your time!
--------------------- results.html ---------------------
{exp:super_search:results channel="teachers|schools|zoo_visitor" status="not closed" orderby="date" sort="desc" limit="29" author_indicator="screen_name" keyword_search_author_name="yes" paginate="bottom" status="Members-id5|Members_Verified_-id6|Members_Pro-id7|open"}
{if super_search_no_results}
Sorry, no results message...
{/if}
{if channel_name == 'teachers'}
<article>
{title}
</article>
{if:elseif channel_name == 'schools' && segment_2 == "search&keywords={super_search_keywords}"}
<article>
{title}
</article>
{/if}
{if:elseif channel_name == 'zoo_visitor' && segment_2 == "search&keywords={super_search_keywords}"}
<article>
{exp:zoo_visitor:details}
{member_lastname}
{exp:zoo_visitor:details}
</article>
{/if}
{paginate}
Page {current_page} of {total_pages} {pagination_links}
{/paginate}
{/exp:super_search:results}