0

I have a Products channel and an Images channel. The Images has a relationship field to Products (basically: a product can have 0 or more images).

Since most of my products do not have images, I'd like to showcase the products with images over the products without images. Meaning, I'd like to create a page that lists only the products that do have images, random order, and allow users to paginate through them.

In Low Search, is there a way to get a list of products that have images?

Products without images will still be viewable by doing a full text search or getting a list of entries based on the EE category they are associated with.

1

One way that's currently possible, is to use a SQL Parameter to query the entry IDs that have a relationship. The other would be to create a custom filter.

| improve this answer | |
  • Thanks Low. Would it be something like this: search:entry_id="SELECT entry_id FROM exp_channel_titles JOIN exp_relationships ON exp_channel_titles.entry_id = exp_relationships.child_id WHERE exp_channel_titles.channel_id = 4;"? This doesn't seem to be working. Am I on the right track? – ExpressionEngineNewbie Oct 12 '15 at 19:31
  • Try entry_id= rather than search:entry_id=. – Low Oct 13 '15 at 9:59

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.