Welcome Servies To Emole Services Developer Documention
You Can Learn How TO Create Services And ALso Create New Mobile App
{{…}} for values, {{#each}} for lists, and {{#if}} for conditions.| Variable | Meaning |
|---|---|
{{config.title}} | A field from this section's schema.json |
{{config.theme.primary}} | A global setting from theme.json |
{{#each products}}…{{/each}} | Store products: {{name}} {{price}} {{oldPrice}} {{image}} {{url}} {{shortDescription}}. Count and category from the limit and categoryId fields |
{{#each categories}} | Top categories, or subcategories on a category page: {{name}} {{url}} |
{{#each featured}} | Featured products, with the same fields as products |
{{#each images}} | On the product page: {{url}} {{thumb}} {{alt}} |
{{#each reviews}} | On the product page: {{title}} {{text}} {{rating}} {{stars}} {{date}} |
{{#each topics}} | Published store pages: {{title}} {{url}} |
{{#each cart}} · {{cart.count}} · {{cart.total}} | The visitor's cart: {{name}} {{quantity}} {{lineTotal}} {{image}} {{url}} |
{{store.name}} · {{store.phone}} · {{store.address}} · {{year}} | Store details |
{{zone:theme_zone_1}} | A widget zone for the merchant's apps |
| Syntax | Meaning |
|---|---|
{{#if config.x}}…{{else}}…{{/if}} | Conditional with a fallback |
{{#unless config.x}}…{{/unless}} | The opposite of if |
{{#each products}}…{{else}}No products{{/each}} | Fallback text for an empty list |
{{@index}} · {{#if @first}} · {{#if @last}} | Item index, first and last item |
| Nested loops | {{#each categories}}{{name}}{{#each featured}}…{{/each}}{{/each}}: the inner loop sees its item's fields, then the outer's |
{{#if}} works on the item's fields: {{#if oldPrice}}.{{product.name | truncate:40 | upper}}. The value is always HTML-encoded after filters, except with .raw.| Filter | Example | Result |
|---|---|---|
truncate:N | {{shortDescription | truncate:60}} | First 60 characters, then "…" |
default:'text' | {{config.badge | default:'New'}} | "New" if empty |
upper · lower | {{sku | upper}} | Upper or lower case (Latin letters) |
date:'format' | {{date | date:'dd/MM/yyyy'}} | Formatted date |
number:N | {{priceValue | number:2}} | Number with separators and decimals |
image:size | {{image | image:600}} | The image at size 600 |
striphtml · nl2br | {{config.text | nl2br}} | Remove tags, or lines to <br/> |
urlencode | https://wa.me/?text={{product.name | urlencode}} | A safe value inside a URL |
append:'…' · prepend:'…' | {{rating | append:'/5'}} | Text after or before the value |