Country Trainers
File:
sections/country-trainers.liquid

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
| ID | Type | Label | Default | Info |
|---|---|---|---|---|
country_name | text | Country Name | Name 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' %}