Getting Started
Step-by-step guide to building your first template with real production examples.
Complete guide to building templates for Simplia e-shop
This documentation is optimized for machine consumption. The following resources are available for AI agents:
The shop-templates plugin gives Claude Code the template rules, this documentation and the tpl command (validate the template, lint its CSS, run its tests, print preview URLs). Install it with:
claude plugin marketplace add https://tpldoc.simplia.cz/claude/marketplace.json
claude plugin install shop-templates@simplia-templatesOutside a Simplia shop environment, tpl works against the template's tpltest host and reads these environment variables:
| Variable | Value |
|---|---|
TPL_BASE_URL | the template's tpltest URL, e.g. https://<hash>-tpltest.simpliashop.cz |
TPL_LAYOUT_DIR | the local directory with the template files (the directory you edit) |
TPL_LAYOUT_CODE | the template code |
TPL_TOKEN | the template API token of the tpltest host, issued by IS from the shared template-api/secret (needed by tpl validate) |
TPL_BACKEND | optional: remote or local; chosen automatically when unset |
To exercise /_/template/validate in a local shop env, put {"template-api/secret": "<value>"} into the eshop root credentials.json (merged by CredentialsStore in LOCAL_DEV when CREDENTIALS_STORE_URL is set) and compute the token as HMAC-SHA256(<value>, "template-api|" + <LAYOUT value>), hex.
Run tpl help for the commands and tpl info to check the setup.
i: prefix denotes Simplia components (<i:img>, <i:list-container>, <i:facebook-share>, ...).tpl extension and follow the directory structure described in File Structureconfig.json (see Configuration)