Skip to content

Country Trainers

File: sections/country-trainers.liquid

Country Trainers

Description

Country Trainers Section

A dynamic section that displays a list of trainers filtered by country.

Features:

  • Collapsible interface with smooth animations
  • Asynchronous loading of trainer data via GraphQL
  • Displays trainer information including:
    • Profile image
    • Name
    • Trainer types
    • Contact information (email, phone)
  • Sorts trainers alphabetically by last name
  • Loading spinner during data fetch
  • Responsive design with mobile-friendly layout

Configuration:

  • Required setting: country_name (text) - Name of country to filter trainers

Technical Details:

  • Uses Shopify’s Storefront API (2024-10)
  • Queries metaobjects of type ‘person’
  • Lazy loads data only when section is expanded
  • Caches results to prevent redundant API calls

Settings

IDTypeLabelDefaultInfo
country_nametextCountry NameName of the country to display trainers for

Usage

This section is referenced in JSON templates and cannot be added via the theme editor.

{% section 'country-trainers' %}