Directory Structure
Core Components
Templates
JSON files that define page structure and content
Sections
Reusable .liquid components for page content
Locales
Translation files for multiple languages
Snippets
Reusable code fragments shared across sections
How These Components Work Together
1
Templates Define Structure
Templates are JSON files that define which sections appear on a page and their order. They also store configuration data for each section.
2
Sections Provide Content
Sections are Liquid files that render the actual content on the page. They can be customized through the theme editor settings defined in their schema.
3
Snippets Add Reusability
Snippets are reusable code fragments that can be included in sections to maintain consistency and reduce duplication.
4
Locales Enable Translation
Locales provide translation capabilities, allowing your theme to support multiple languages.
Data Flow
How Data Flows Through Your Theme
How Data Flows Through Your Theme
- The Members Area loads the appropriate template JSON file (index.json or login.json)
- It reads the sections and their order from the template
- For each section, it:
- Loads the section’s Liquid file
- Passes the section’s settings from the template to the section
- Renders the section with its data
- Within sections, you can:
- Access global objects like
all_courses
- Render snippets for reusable UI components
- Use translations via the
t
filter
- Access global objects like
Available Global Objects
Check Objects Overview for a complete list and more details.all_courses
Access to all courses the user has permission to view
all_modules
Access to all modules across all courses
all_lessons
Access to all lessons across all modules
last_watched_lessons
Array of recently viewed lesson IDs
Styling
Kiwify themes use TailwindCSS for styling, a utility-first CSS framework that allows you to style elements directly in your HTML/Liquid markup.
Available Libraries
The theme runtime environment includes the following libraries available for use:- Embla Carousel: for creating carousels
- Microtip: for displaying tooltips
Limitations
- JavaScript is not currently supported in theme files
- Only two pages can be customized (index and login)
- Maximum of 25 sections per template
- Maximum of 50 blocks per section