I had a question regarding combining a category group across numerous channels and use the category selected to determine the content displayed.
I have created a category that lists the services the client specialises in.
We have three channels that use this category group
1. Staff channel – We use the category group to determine the services the staff member specialises in
2. Services channel – We use the category group to determine what area of the business the service described applies to
3. Articles channel – Their marketing team publish articles related to services they provide
So for example, one service they provide is “funds” advice so we want to create a “fund” home page that pulls in content from the channels listed above. All of the staff members, services entry and articles that relate to “funds” have that box checked in the category tab of their entry. They all share the same category selection.
We have created the page and it is pulling in the correct services info and the staff members related to funds but we can’t get the articles to appear 100% correct.
We want to pull in the latest 5 articles that relate to “funds” but at the moment all we can do is pull the latest 5 regardless of the category selected in the service area entry.
Here is some simplified sample code:
{exp:channel:entries channel="service_area" limit="1" }
<h2>Service</h2>
<p>{title}<br />
{service_area_description}</p>
<h2>Our Staff in this area</h2>
<p>{ key_people}<br />
<li>{key_person_list}<a href="http://{page_uri}">{person_name}</a>{/key_person_list}</li><br />
{/key_people}</p>
<h2>Articles</h2>
<p>{exp:channel:entries channel="articles" limit="5" dynamic="no"}<br />
{categories}<br />
<li><a href="http://{page_uri}">{title}</a></li><br />
{/categories}<br />
{/exp:channel:entries}</p>
<p>{/exp:channel:entries}The template referenced above is been re-used via the pages module to approx 20 services they specialise in so I can’t hard code the category code so it only shows the “fund” articles.
Any ideas how we can edit those snippets so that only the “funds” articles will dynamically appear?