All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Relationship field is x or is_empty

travisb 17 Apr 2014 03:16 question, complete

I've backed myself in a corner as I overlooked one problem: it doesn't seem like it's possible to search on a relationship field with a specific child entry and yet also include all entries with no relationship.

So although this doesn't work, I would have something like:
{exp:low_search:results
child:vehicle_fits="IS_EMPTY|153"
...

The application is for a products channel where some are vehicle specific and some are not (generic). I can only see these options:
1 - Add a dummy related entry and force all generic entries to use that relationship. Then do something like child:vehicle_fits="3001[the generic entry id]|153"
2 - Add a second results tag pair to show all generic entries after the first.
3 - I've missed something obvious and will be shown to be a complete nube.

Replies

  1. Low 17 Apr 2014 07:22

    The IS_EMPTY syntax only works for Field Search filters, I'm afraid. Option 1 would be best.

  2. travisb 17 Apr 2014 13:03

    Was afraid of that, thanks.