0

We currently perform searches and filters and we need to ALWAYS match results to a parent entry (lets assume entry ID 19826 - variable obviously).

We are using the native relationship field in EE 2.8.1 and low search 4.4.2

We need to use low search so that we can filter by category AND match keywords where the parent entry is 19826 (variable obviously).

An example query would be:

http://example.com/sandbox?child:related_field=19826

What we would like to do is search ALL channels for related child entries, is this possible, what would the typical query pattern for this be, can we combine multiples, for example:

http://example.com/sandbox?child:related_field=19826&child:another_related_field=19826

OR is there a way to simply search all entries that match our parent ID:

http://example.com/sandbox?child=19826

We've also tried multiple params as hidden fields in the form:

{exp:low_search:form result_page="/sandbox"}    
    <input type="hidden" name="child:related_field" value="19826">
    <input type="hidden" name="child:another_related_field" value="19826">      
    <button type="submit">Go</button>  
{/exp:low_search:form}

But no luck, this works if we ONLY have a single hidden field.

0

You can combine any amount of filter parameters, including multiple Relationships filters. Your second example would read like:

Return entries that have both entry 19826 as a child via the related_field field and via the another_related_field field.

Right now, you can't consolidate the two parameters into a single one out of the box, but you could either use JS to populate the two parameters on form submit, or you could use an extension that uses the low_search_pre_search hook to populate the two parameters based on single one.

| improve this answer | |
  • So, point one you made: combining params including multiple relationships. This doesn't seem to work. I've added example above. – paulcripps Mar 21 '16 at 22:14
  • If the search doesn't work as expected, please open a GetSat thread so we can debug this properly. Include your Template Debugger output to the report. – Low Mar 22 '16 at 7:39
  • Thread opened getsatisfaction.com/low/topics/… – paulcripps Mar 22 '16 at 13:29

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.