Developers · Modules
Module Templates
Last updated 2 November 2026
With module templates, you can configure modules before deploying them to an environment. For example, you can specify the slug for a page (where the page will be available after the module is installed) upon installing the module.
Configuration
Values for variables have to be provided in the
modules
└──my-custom-module
├── template-values.json
├── private
│ └── graphql
│ ├── get_customizations.graphql
│ └── get_pages.graphql
└── public
└── views
└── pages
└── dashboard.liquidAdding templates to module code
Templates work in deploy mode (with the
In both deploy and sync modes, adding templates to module code works similarly. If you have sync mode running and you change the
Markup
Everything between
Example
If you have a page with this code:
---
slug: <%= &slug =%>
layout: modules/contact_form/main
---
<h1><%= title =%></h1>And a top-level
{
"slug": "contact_form",
"title": "Contact Page title"
}During deploy or sync, it will get filled in and sent to the server as follows:
---
slug: contact_form
layout: modules/contact_form/main
---
<h1>Contact Page title</h1>