Searching for entries which are children of a Playa field within a Matrix
I am developing a magazine site, and am searching for articles based on the issue they appeared in. Articles are grouped into issues via each Issue entry. It has a Matrix (issue_toc), which has a Playa column, and that Playa field selects an entry from Articles.
I had thought that maybe this would work, but its not doing the trick. (Simplified example - entry_id is the parent Issue's.)
<a href="{exp:low_search:url parent:issue_toc="{entry_id}" collection="articles"}">See all articles from {title}</a>
Am I on the right track? Is this even possible?
Replies
Low 13 May 2013 17:04
If you look at the exp_playa_relationships table, the parent:-param will give you all child_entry_ids where the parent_entry_id is the given ID. However, since you're using Matrix, the parent_entry_id will be NULL and the relationship is determined by parent_col_id and parent_row_id instead.
So, alas, no. It's not possible at the moment...
Derek 13 May 2013 17:17
Gotcha, I figured as much. Will rework.
Derek 13 May 2013 19:59
Update: solved this for myself using the low_search_catch_search extension hook - others could repurpose this pretty easily to suit their particular setup.