Low search pagination with multiple collections (each collection a different channel)?
I'm having some problems using LowSearch with multiiple collections and pagination. Is this possible?
I can get it working without pagination by doing an {if channel = 'foo'} and then checking if the different fields for each channel have content but I get a PHP error with everything I have tried for multiple collections (each are different channels) and pagination. I'd be very grateful for any help!
Thanks,
Alex.
Replies
Low 2 Oct 2013 09:43
Not sure I follow completely. Can you try and rephrase? Add the error message you're getting and the Low Search Results tag here (use http://pastie.org for large chunks of code).
Alicks Bassline Smith 2 Oct 2013 13:26
Hi Low, I appreciate the quick reply - the results page is the problem when I try to have more than one collection in the results. It's probably easier to show you the code I have working in the results tag:
http://pastie.org/pastes/8372085/
Each of the collections is a different channel with different fields - with the standard EE search I can do:
{if channel = "library_conference_and_seminar_papers"}
... do something with these specific channel fields...
{/if}
At the moment the code I have in the pastie works but only works for one of the collections - can you just advise on the code to deal with different collections in different channels and still have the pagination working?
Low 2 Oct 2013 14:27
What if you use the {channel_short_name} variable for the conditionals?
Alternatively, you could try and use Switchee.
Oh, and by the way, the parameter is called collection (singular), not collections (plural), like in your code example.