Having an issue with this. I have a category group called ‘Positions’. I am looping the categories so that they output the name and then use the category_name to also run a nested channel entry loop for that current category term. Within those entry results I also want to output what location they are from which is setup as a different set of categories.
Here is the code:
{exp:channel:categories category_group="4"}
<section class="team">
<h4>{category_name}</h4>
<p> <ul class="members clearfix"><br />
{exp:channel:entries channel="team_members" category="{category_id}" orderby="last_name" sort="asc"}</p>
<p> <li><br />
<div class="member-info"><br />
</p><h6>{title} <span>{job_title}</span></h6>
<p> <div class="branch"><br />
<span class="branch-name">{categories show_group="5"}{category_name}{/categories}</span><br />
{if phone_number != ''}<span class="phone">{phone_number}</span>{/if}{if email_address != ''}<a href="mailto:{email_address}" class="email">Send an Email</a>{/if}<br />
</div><br />
</div><br />
<div class="member-bg"></div><br />
{photo}<br />
</li><br />
{/exp:channel:entries}<br />
</ul><br />
</section><br />
{/exp:channel:categories}What is happening is the location category call is just outputting the position category name again. Seems it is being overridden and I need to end/restart the loop somehow.