0

I've got a portfolio site I'm building, and on each project's page I'm wanting to show a list of people who worked that project. I created a channel section called "work" with an entry field type called "team". I then created another channel called teamMembers with a plain-text field for their name, another plaintext field for a link to their website, an assets field for their profile picture, and a categories field which would indicate their role in the project. When I'm adding a project as an entry in "work" i have an entries field that allows me to select team members from the teamMembers channel.

For the life of me I can't figure out how to display a list of team members (with each team member's name, link and photo) who worked on a project.

Here's my progress so far: http://dziey3.com/work/polaris

<div class="team-members">
            <h3>Team</h3>

            {% set team = entry.team %}
            {% for asset in entry.teamMembersPhoto.find() %}
            <img src="{{ asset.url }}">
            {% endfor %}
            {% for field in team %}
            <p>{{ field.title }}</p>
            {% endfor %}
        </div>

Thanks in advance

1 Answer 1

1

It seems on your website that you get the team listed, but not the photos. I think the problem might be that you are accessing the teamMembersPhotoof the entry, not the team.

You can try changing it to {% for asset in team.teamMembersPhoto.find() %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.