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.

Only display data whose related entries belong to a selected category

December 02, 2012 4:19pm

Subscribe [1]
  • #1 / Dec 02, 2012 4:19pm

    susanfw

    62 posts

    The following code displays data about students. I want to be able filter it by the category of the related entry, which is ‘student_schoolname’. I am able to display the category, but can’t figure out how to only display the students, who school is in a selected category.

    {exp:channel:entries channel="students" disable="member_data|pagination|trackbacks" status="not closed"}            
    <ul>
                <li>{student_firstname} {student_lastname}</li>
                <li>{graduation_year}</li>
                <li>{related_entries id="student_schoolname"}{title}{/related_entries}</li>
                <li>{related_entries id="student_schoolname"} {categories}
                {category_name}{/categories}
                {/related_entries}</li>
        
      </ul>
    {/exp:channel:entries}

    I would appreciate some help with this.

    Susan

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

ExpressionEngine News!

#eecms, #events, #releases