Skip to main content

What you’ll build

A team member directory that includes:
  • Staff profiles with photos, roles, and contact info
  • Department organization
  • Filtering by department or role
  • Individual profile pages
  • Integration with other content types

Step 1: create a departments collection

First, create a Collection to store department information:
  1. Go to Content TypesCollections
  2. Create a new Collection called “Departments”
  3. Add fields:
    • Name (Short Text) - Department name
    • Slug (Short Text) - URL-friendly identifier
    • Description (Long Text) - Department description
Example departments:
  • Engineering
  • Marketing
  • Sales
  • Customer Support
  • Human Resources

Step 2: create the team members collection

Create a Collection for team members with these fields:
  • Name (Short Text) - Full name
  • Headshot (Media) - Profile photo
  • Role (Short Text) - Job title
  • Department (Reference) - Link to Departments collection
  • Email (Short Text) - Contact email
  • Bio (Long Text) - Short biography
  • LinkedIn (Short Text) - Social profile URL
When storing personal data like email addresses and social profiles, ensure compliance with privacy regulations (GDPR, CCPA, etc.). Consider making social profile fields optional and informing team members about public visibility.
Collection configuration Set the Collection Label to display team member names: Collection Label dropdown

Step 3: add team members

Add team members to your Collection: Adding team members

Step 4: fetch team members

Write less code by leveraging API parameters

Our collections API supports ordering during fetch with the order parameter, which can be utilized with dot notation to order by specific fields: order=fields.department.You can also use the page, page_size, limit, and offset parameters for instant pagination.

Speed things up with an SDK

These code examples use native libraries like fetch and requests to pull data from the API.For your actual implementation, we recommend using one of our many SDKs instead, which come with prebuilt support for the various content type API endpoints, as well as features like timeout, error handling, query parameters, and more.
Query the team members Collection directly to fetch all team members:

API response structure

Step 5: display the team directory

Create a team directory component:

Add filtering by department

This example shows one way of adding filtering by department, but you can also filter queries directly from the API using the fields parameter: fields.department=some_string

Step 6: reference team members in pages

You can reference team members from other pages. For example, on a blog post, you can reference the author: Reference field to Collection Select team members to display: Selecting team members

Advanced: hierarchical organization

For organizations with more than 20-30 team members, consider adding a hierarchical structure:

1. Add manager Reference

Add a “Reports To” reference field in your Team Members collection that references itself:

2. Build org chart

Use cases