1

SEE: Channel Entries - possible to search relationship field?

Has anything changed since the above question? I want to list all Channel entries for a given value in a relationship field. Something like this:

search:my_relationship:url_title="foo"

EDIT 1:

I didn't explain my problem properly. My Channel has a grid. The grid has a relationship field. When I loop through the grid entries, I want to apply a search filter to it.

  • Did you ever get this figured out? – Gayle Jenkins Jan 3 at 23:48
2

This is easy using Low Search and its Relationships filter. You don't necessarily need a search form, as you can use the Results tag as a drop-in replacement for the channel:entries tag. Then you can use this parameter:

{exp:low_search:results child:rel_field="1|2|3"}

...which will give you all entries that have entry ID 1, 2 or 3 assigned to them as a child.

Or:

{exp:low_search:results child:rel_field="foo"}

...which will give you all entries that has the entry with URL-title 'foo' assigned to them as a child.

The reverse is also possible:

{exp:low_search:results parent:rel_field="4|5|6"}
{exp:low_search:results parent:rel_field="bar"}
  • 1
    Thanks. I failed to mention that I am trying to loop the entries in a grid. One of the fields in the grid is a relationship field. I only want grid entries whose relationship field's url title matches a certain string. Is that possible with Low Search? – ExpressionEngineNewbie Apr 8 '15 at 23:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.