ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Looped Channel Entries in Specific Category are not allowing output of other category name

July 02, 2014 12:39pm

Subscribe [1]
  • #1 / Jul 02, 2014 12:39pm

    akeith2002

    1 posts

    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.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases