Just wondering if there’s a better way to go about this.
Our site has multiple services. For example, we are a marketing company that does “market research” which is one of our services.
On that page, I’d like to show the person (professional in this case) that does that service for our company.
So i figured I’d show that persons info using if statements, depending on which service page they were on, it’d show the professionals info based on their unique entry_id.
We’ve got about 20 different services and 8 professionals, so this wouldn’t be all the code. I just thought there might be a better way to condense this. Also, would this tax server because of all the requests?
{exp:channel:entries channel="professionals" dynamic="no" entry_id="10"}
{if segment_3 == "web-design-and-development" || segment_3 =="mobile"}
<a href="http://{title_permalink=marketing/professionals}">{professionals_thumbnail}</a>
{/if}
{/exp:channel:entries}
{exp:channel:entries channel="professionals" dynamic="no" entry_id="9"}
{if segment_3 == "pay-per-click" || segment_3 =="seo" || segment_3 =="content-marketing"}
<a href="http://{title_permalink=marketing/professionals}">{professionals_thumbnail}</a>
{/if}
{/exp:channel:entries}
{exp:channel:entries channel="professionals" dynamic="no" entry_id="15"}
{if segment_3 == "channel-marketing" || segment_3 =="integrated-communications" || segment_3 =="market-research"}
<a href="http://{title_permalink=marketing/professionals}">{professionals_thumbnail}</a>
{/if}
{/exp:channel:entries}