I have some parent entries that I am looking to filter down using a date field. I know the search functions are not available in the parent or relationship fields. What other options do I have?

I was thinking of doing a separate entries tag, but have not found a way to select all entries that are related to another specific entry, like this:

{exp:channel:entries search:parent_entry="1234"}

  • 1
    Can you elaborate on how your relationships are setup, and exactly ow you want to filter them? Maybe give an example? – Derek Hogue Jul 11 '14 at 12:18
up vote 0 down vote accepted

Here is how you can get all your parent entry ids into another channel entry tag.

1.) Create a Template with your parent channel tag and pass an embed variable to it from your main template. Here you can add any parameter you need to get the needed data.

{exp:channel:entries channel="parent" entry_id="{embed:eid}" }
    <h1>Parent Data</h1>
{/exp:channel:entries

2.) Embed the above template in your main template. And pass the parent entry_ids into the embeded template.

{exp:channel:entries channel="child"}
   {embed="template/parent-entries" eid="{parents channel="parent" backspace="1"}{entry_id}|{/parents"}
{/exp:channel:entries}

Your Answer

 
discard

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.