Limiting Search Results by Matrix Column Data
I have a Low Search results page that I have actually posted to here before, but I had one other quick thing I needed done. There are three different drop downs that trigger a different search collection. So the state drop down triggers the state search collection and so on.
When I print my results, I get the correct entries, but each entry has a matrix field with the state drop down in each row for that entry. So I might have a class in Oregon, Texas and Maine, but all of those classes reside within a Matrix field that is part of one class entry.
I want to be able to limit the number of locations or dates to just the one matrix row that has that particular date or state in it.
If that makes sense. You can find my current display code at http://pastie.org/4227278
Thanks for any help!
Replies
Low 9 Jul 2012 19:23
You could try and use Matrix' search parameters and feed it the keywords to filter the matrix rows.
Peter Riley Osborne 9 Jul 2012 20:57
So would you do a conditional statement for that? Something like {if collection == 'location' }
Then {matrixfield search:month="{exp:low_search:keywords query="{segment_3}"}"}
Or something similar to that?
Low 9 Jul 2012 22:35
Actually, scratch that. That won't work.
There is no way to do this without using an embed, I guess. I've done a quick test, and if you follow this example: http://pastie.org/4228399 it should work.