To display colleagues of the current team member while excluding the current team member from the list in Webflow CMS, you can utilize a combination of Webflow's Collection Lists, filters, and custom code (if necessary). This approach requires a sound understanding of Webflow's CMS functionalities, including the use of dynamic lists and conditional visibility settings. Here is a detailed explanation of the method:
Step-by-Step Process:
1. Create a Collection for Team Members:
– First, ensure you have a Collection set up for your team members. This Collection should include fields such as Name, Position, Bio, Image, and any other relevant information about the team members.
– Example fields:
– Name (Plain Text)
– Position (Plain Text)
– Bio (Rich Text)
– Image (Image)
2. Design the Team Member Detail Page:
– Create a Template Page for the Team Members Collection. This page will be used to display the details of each team member.
– On this Template Page, add elements to display the team member's information, such as their name, position, bio, and image.
3. Add a Collection List for Colleagues:
– Below the team member details, add a Collection List element to display the colleagues.
– Bind this Collection List to the Team Members Collection to pull in the data for all team members.
4. Filter the Collection List to Exclude the Current Team Member:
– To exclude the current team member from the list of colleagues, you need to add a filter to the Collection List.
– In the Collection List settings, add a filter where the Name (or another unique identifier) is not equal to the Name of the current team member.
– This can be done by selecting "Filter" in the Collection List settings and then setting a condition like "Name is not equal to Current Team Member's Name."
5. Enhance with Custom Code (Optional):
– If you need more complex filtering that cannot be achieved with Webflow's built-in filters, you can use custom JavaScript code to manipulate the DOM and exclude the current team member.
– Example JavaScript:
javascript
document.addEventListener('DOMContentLoaded', function() {
var currentMemberName = document.querySelector('.current-member-name').innerText;
var colleagueItems = document.querySelectorAll('.colleague-item');
colleagueItems.forEach(function(item) {
var colleagueName = item.querySelector('.colleague-name').innerText;
if (colleagueName === currentMemberName) {
item.style.display = 'none';
}
});
});
– In this script, `.current-member-name` is a class applied to the element displaying the current team member's name, and `.colleague-item` and `.colleague-name` are classes applied to the elements in the Collection List.
6. Styling and Final Touches:
– Style the Collection List to match the design of your website. Ensure that the layout is visually appealing and provides a good user experience.
– Test the page to ensure that the current team member is correctly excluded from the list of colleagues.
Example Scenario:
Suppose you have a team member named "Alice" whose details are being viewed on the Team Member Detail Page. You want to display a list of her colleagues, but exclude Alice from this list. Here is how you can achieve this:
1. Team Members Collection:
– Alice (Name: Alice, Position: Developer, Bio: …, Image: …)
– Bob (Name: Bob, Position: Designer, Bio: …, Image: …)
– Carol (Name: Carol, Position: Manager, Bio: …, Image: …)
– Dave (Name: Dave, Position: Developer, Bio: …, Image: …)
2. Team Member Detail Page:
– Display Alice's details.
– Add a Collection List to display colleagues.
– Apply a filter to the Collection List: "Name is not equal to Alice."
3. Result:
– The Collection List will display Bob, Carol, and Dave, but not Alice.
By following these steps, you can effectively display colleagues of the current team member while excluding the current team member from the list. This approach leverages Webflow's CMS capabilities and, if necessary, enhances functionality with custom code to achieve the desired outcome.
Other recent questions and answers regarding Examination review:
- How can you link a team member's recent projects to their detail page using a multi-reference field in Webflow CMS?
- What steps should be taken to ensure that the biography section resizes dynamically based on the content?
- How can you dynamically pull a team member's name from the CMS collection to display it on the detail page?
- What are the key elements that should be included in each team member's biography page in Webflow CMS?

