We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Finding related entries of related entries?

Development and Programming

kelseyads2's avatar
kelseyads2
98 posts
12 years ago
kelseyads2's avatar kelseyads2

We are working on a website for a hospital, and have setup Physicians and Pages (Structure) channels, which both have associations (Playa fields) to a Specialties channel.

Physicians can be associated with multiple specialties.

Pages can be associated with multiple specialties.

On individual pages, we want to show Physicians that are associated with the same Specialties that the Page is associated with.

Does that make sense?

I can’t figure out how to get it to work… any thoughts?

       
kelseyads2's avatar
kelseyads2
98 posts
12 years ago
kelseyads2's avatar kelseyads2

I can get the ID’s of the specialties using {exp:playa:child_ids} but haven’t been able to get an channel entries loop based on that. Here’s what I’ve got that is not working:

{exp:channel:entries channel="static_pages" limit="1"}
       
       {exp:playa:child_ids field="pages_specialty"}

          {exp:channel:entries channel="physicians" limit="5" search:physicians_specialties"{exp:playa:child_ids field="pages_specialty"}"}
         <li><a href="http://{path={channel_short_name}/{url_title}}">{title}</a></li>
       {/exp:channel:entries}
        
      {/exp:channel:entries}
       
kelseyads2's avatar
kelseyads2
98 posts
12 years ago
kelseyads2's avatar kelseyads2

Any thoughts?

I’ve tried stashing a list of specialties and then using that as search criteria in a loop, but it’s not working. Really hoping to find a solution to this soon. Thanks!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.