platformos-check 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c1d041a69002febe0f7b118bbe6de77868c16780972f3c567b4835575cb3491
4
- data.tar.gz: 12e2442882f8bea0a12dbeea557b5c4b9a74a94db919d8c740862bcdb8b7e03e
3
+ metadata.gz: 6ba2a7bdea1c4f4efa47ec56d9bdd78af6a9f1a6997d45390b3463c81699b6c1
4
+ data.tar.gz: 0363b92c73e69aea53f5222fe0d1dab25638446a2fbd3ae6fe30efbea6db9d0b
5
5
  SHA512:
6
- metadata.gz: addc32a98bdbcab0b7f5093ab5878fa9ad23c879c23fe90e3152fa6bfc0be2df2d2ed3f34fd805d8b52bc998ac006bfb448708642b4851735abd78f9ba32621d
7
- data.tar.gz: e4db84164580fc87b9195cf22100d704af7c9072aa67549a011efef9d7eed064f901c5d6d2f4dd3887dcf1fb1b70d24194c79c2d0b6ed01c691e419b7e159bae
6
+ metadata.gz: f49c148021d7a80b8f40dd33b10c997a05dc1ffc9600043eec6ce85de7d906266edaad5aae42e93554773a01a87e09254b7c2b4d9c9d49c4c9e468fbb2d8821d
7
+ data.tar.gz: 35647ae9b84e54798383c60ea57fc298b57b533c23e499b76b035135bd417b0e688ea5078dcd1820871911c7e155937315f3e608baf2852b274f111bddbdc547
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- v0.1.0 /
1
+ v0.2.0 / 2023-09-13
2
+ ==================
3
+
4
+ * Completion and hover for tags
5
+ * Fix completion from the middle of the partial
6
+
7
+ v0.1.0 / 2023-09-13
2
8
  ==================
3
9
 
4
10
  * Better documentation for filters
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
3
 
4
- [{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"constants","examples":[],"json_data":{"path":"","handle":"context.constants","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"Include the `content_for_layout` object in your [layout files](/themes/architecture/layouts) between the `\u003cbody\u003e` and\n`\u003c/body\u003e` HTML tags.\n\n\u003e Note:\n\u003e The `content_for_layout` object is required in `theme.liquid`.","properties":[],"summary":"Dynamically returns content based on the current [template](/themes/architecture/templates).","name":"content_for_layout","examples":[],"json_data":{"path":"","handle":"","data_from_file":""},"return_type":[{"type":"string","name":"","description":"","array_value":""}]},{"access":{"global":true,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"authenticity_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"session","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"csrf_request_valid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"current_user","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"current_user"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"headers","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"headers"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"params","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"environment"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"is_xhr"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"instance","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"instance"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"location","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"location"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"page","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"page"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"layout","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"visitor","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"visitor"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"useragent"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"device","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"cookies","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"cookies"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"post_params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"hcaptcha_site_key"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"globals","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"globals"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"modules","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"modules"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"constants","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"constants"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"flash","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"flash"}],"summary":"todo summary","name":"context","examples":[],"json_data":{"path":"","handle":"context","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_pos_session"}],"summary":"todo summary","name":"cookies","examples":[],"json_data":{"path":"","handle":"context.cookies","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"first_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"last_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"email"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"}],"summary":"todo summary","name":"current_user","examples":[],"json_data":{"path":"","handle":"context.current_user","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_brand"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_type"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"known"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_name"}],"summary":"todo summary","name":"device","examples":[],"json_data":{"path":"","handle":"context.device","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"flash","examples":[],"json_data":{"path":"","handle":"context.flash","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[{"object":"forloop","property":"parentloop"}],"template":[]},"deprecated":false,"deprecation_reason":"","description":"","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The total number of iterations in the loop.","name":"length"},{"deprecated":false,"deprecation_reason":"","description":"If the current `for` loop isn't nested inside another `for` loop, then `nil` is returned.","examples":[{"name":"Use the `parentloop` property","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..3) -%}\n {% for j in (1..3) -%}\n {{ forloop.parentloop.index }} - {{ forloop.index }}\n {%- endfor %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"return_type":[{"type":"forloop","name":"","description":"","array_value":""}],"summary":"The parent `forloop` object.","name":"parentloop"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration.","name":"index"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration.","name":"index0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration, in reverse order.","name":"rindex"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration, in reverse order.","name":"rindex0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the first. Returns `false` if not.","name":"first"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the last. Returns `false` if not.","name":"last"}],"summary":"Information about a parent [`for` loop](/docs/api/liquid/tags/for).","name":"forloop","examples":[{"name":"Use the `forloop` object","description":"","syntax":"","path":"/","raw_liquid":"{% for page in pages -%}\n {%- if forloop.length \u003e 0 -%}\n {{ page.title }}{% unless forloop.last %}, {% endunless -%}\n {%- endif -%}\n{% endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"json_data":{"path":"","handle":"","data_from_file":"{\"first\":true,\"index\":1,\"index0\":0,\"last\":false,\"length\":4,\"rindex\":3}"},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"time_zones","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"time_zones"}],"summary":"todo summary","name":"globals","examples":[],"json_data":{"path":"","handle":"context.globals","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"QUERY_STRING"}],"summary":"todo summary","name":"headers","examples":[],"json_data":{"path":"","handle":"context.headers","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"uuid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"}],"summary":"todo summary","name":"instance","examples":[],"json_data":{"path":"","handle":"context.instance","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"layout","examples":[],"json_data":{"path":"","handle":"context.layout","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"url"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"href"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"host"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"pathname"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"search","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"search"}],"summary":"todo summary","name":"location","examples":[],"json_data":{"path":"","handle":"context.location","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"scope_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"version_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_info"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"subscription_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"subscription_info"}],"summary":"todo summary","name":"module","examples":[],"json_data":{"path":"","handle":"modules.module","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"module","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"module"}],"summary":"todo summary","name":"modules","examples":[],"json_data":{"path":"","handle":"context.modules","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"enable_profiler"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"page","examples":[],"json_data":{"path":"","handle":"context.page","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"format"}],"summary":"todo summary","name":"params","examples":[],"json_data":{"path":"","handle":"context.params","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"search","examples":[],"json_data":{"path":"","handle":"location.search","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_csrf_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session_id"}],"summary":"todo summary","name":"session","examples":[],"json_data":{"path":"","handle":"context.session","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"subscription_info","examples":[],"json_data":{"path":"","handle":"module.subscription_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"all"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"us_zones"}],"summary":"todo summary","name":"time_zones","examples":[],"json_data":{"path":"","handle":"globals.time_zones","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_name"}],"summary":"todo summary","name":"version_info","examples":[],"json_data":{"path":"","handle":"module.version_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"ip"}],"summary":"todo summary","name":"visitor","examples":[],"json_data":{"path":"","handle":"context.visitor","data_from_file":""},"return_type":[]}]
4
+ [{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"constants","examples":[],"json_data":{"path":"","handle":"context.constants","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"Include the `content_for_layout` object in your [layout files](/themes/architecture/layouts) between the `\u003cbody\u003e` and\n`\u003c/body\u003e` HTML tags.\n\n\u003e Note:\n\u003e The `content_for_layout` object is required in `theme.liquid`.","properties":[],"summary":"Dynamically returns content based on the current [template](/themes/architecture/templates).","name":"content_for_layout","examples":[],"json_data":{"path":"","handle":"","data_from_file":""},"return_type":[{"type":"string","name":"","description":"","array_value":""}]},{"access":{"global":true,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"authenticity_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"session","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"csrf_request_valid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"current_user","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"current_user"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"headers","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"headers"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"params","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"environment"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"is_xhr"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"instance","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"instance"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"location","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"location"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"page","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"page"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"layout","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"visitor","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"visitor"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"useragent"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"device","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"cookies","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"cookies"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"post_params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"hcaptcha_site_key"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"globals","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"globals"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"modules","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"modules"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"constants","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"constants"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"flash","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"flash"}],"summary":"todo summary","name":"context","examples":[],"json_data":{"path":"","handle":"context","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_pos_session"}],"summary":"todo summary","name":"cookies","examples":[],"json_data":{"path":"","handle":"context.cookies","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"first_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"last_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"email"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"}],"summary":"todo summary","name":"current_user","examples":[],"json_data":{"path":"","handle":"context.current_user","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_brand"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_type"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"known"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_name"}],"summary":"todo summary","name":"device","examples":[],"json_data":{"path":"","handle":"context.device","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"flash","examples":[],"json_data":{"path":"","handle":"context.flash","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[{"object":"forloop","property":"parentloop"}],"template":[]},"deprecated":false,"deprecation_reason":"","description":"","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The total number of iterations in the loop.","name":"length"},{"deprecated":false,"deprecation_reason":"","description":"If the current `for` loop isn't nested inside another `for` loop, then `nil` is returned.","examples":[{"name":"Use the `parentloop` property","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..3) -%}\n {% for j in (1..3) -%}\n {{ forloop.parentloop.index }} - {{ forloop.index }}\n {%- endfor %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"return_type":[{"type":"forloop","name":"","description":"","array_value":""}],"summary":"The parent `forloop` object.","name":"parentloop"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration.","name":"index"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration.","name":"index0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration, in reverse order.","name":"rindex"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration, in reverse order.","name":"rindex0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the first. Returns `false` if not.","name":"first"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the last. Returns `false` if not.","name":"last"}],"summary":"Information about a parent [`for` loop](/docs/api/liquid/tags/for).","name":"forloop","examples":[{"name":"Use the `forloop` object","description":"","syntax":"","path":"/","raw_liquid":"{% for page in pages -%}\n {%- if forloop.length \u003e 0 -%}\n {{ page.title }}{% unless forloop.last %}, {% endunless -%}\n {%- endif -%}\n{% endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"json_data":{"path":"","handle":"","data_from_file":"{\"first\":true,\"index\":1,\"index0\":0,\"last\":false,\"length\":4,\"rindex\":3}"},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"time_zones","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"time_zones"}],"summary":"todo summary","name":"globals","examples":[],"json_data":{"path":"","handle":"context.globals","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"QUERY_STRING"}],"summary":"todo summary","name":"headers","examples":[],"json_data":{"path":"","handle":"context.headers","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"uuid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"}],"summary":"todo summary","name":"instance","examples":[],"json_data":{"path":"","handle":"context.instance","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"layout","examples":[],"json_data":{"path":"","handle":"context.layout","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"url"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"href"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"host"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"pathname"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"search","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"search"}],"summary":"todo summary","name":"location","examples":[],"json_data":{"path":"","handle":"context.location","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"scope_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"version_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_info"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"subscription_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"subscription_info"}],"summary":"todo summary","name":"module","examples":[],"json_data":{"path":"","handle":"modules.module","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"module","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"module"}],"summary":"todo summary","name":"modules","examples":[],"json_data":{"path":"","handle":"context.modules","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"enable_profiler"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"page","examples":[],"json_data":{"path":"","handle":"context.page","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"format"}],"summary":"todo summary","name":"params","examples":[],"json_data":{"path":"","handle":"context.params","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"search","examples":[],"json_data":{"path":"","handle":"location.search","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_csrf_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session_id"}],"summary":"todo summary","name":"session","examples":[],"json_data":{"path":"","handle":"context.session","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"subscription_info","examples":[],"json_data":{"path":"","handle":"module.subscription_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"all"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"us_zones"}],"summary":"todo summary","name":"time_zones","examples":[],"json_data":{"path":"","handle":"globals.time_zones","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_name"}],"summary":"todo summary","name":"version_info","examples":[],"json_data":{"path":"","handle":"module.version_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"ip"}],"summary":"todo summary","name":"visitor","examples":[],"json_data":{"path":"","handle":"context.visitor","data_from_file":""},"return_type":[]}]
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
3
 
4
- [{"category":"variable","deprecated":false,"deprecation_reason":"","description":"You can create variables of any [basic type](/docs/api/liquid/basics#types), [object](/docs/api/liquid/objects), or object property.","parameters":[],"summary":"Creates a new variable.","name":"assign","syntax":"{% assign variable_name = value %}","syntax_keywords":[{"keyword":"variable_name","description":"The name of the variable being created."},{"keyword":"value","description":"The value you want to assign to the variable."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{%- assign product_title = product.title | upcase -%}\n\n{{ product_title }}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Invokes code within the tag asynchronously, in the background.\nYou will only have access to variables you explicitly pass to the background tag. The context object is available by default, but with limitations - you need\nto explicitly pass page/layout metadata if you want to use it, as well as device and constants.","syntax":"Run background code from partial\nThe following code will run all the log queries in the background, not earlier than 0.5 minute (30 seconds) since the execution. You will only have access to variables\nexplicitly provided to the background tag: \\\"data\\\" and \\\"hey\\\". Note that you will not have access to the \\\"my_data\\\" variable. Also note\nthat the result of this background tag will not be rendered, and you will not have access to any variable inside the background tag.\n\n# app/views/partials/example_partial.liquid\n{% liquid\n log not_available_in_background # Will be null, as this variable was not passed to the background tag\n log data # You will see { \\\"hello\\\": \\\"world\\\" }, as it was provided to the background tag\n log hey # You will see \\\"hello\\\" as it was provided to the background tag\n log context # You will copy the current request context and make it available in the background\n assign not_available_outside = \\\"You will not see me\\\"\n\n%}\n\n# app/views/pages/test.liquid\n{% liquid\n assign my_data = null | hash_merge: hello: \\\"world\\\"\n assign not_available_in_job = \\\"You will not see me \\\"\n background job_id = 'example_partial', delay: 0.1, max_attempts: 3, source_name: 'custom_job', data: my_data, hey: 'hello'\n\n # This variable will be rendered in the background, meaning you won't see anything on the page\n echo not_available_outside\n%}","name":"background","parameters":[{"description":"Any variable provided to the background tag will become accessible in the code.","name":"options","required":false,"types":["untyped"]},{"description":"which defines the number of minutes to delay running code (defaults to 0, which means run code as soon as possible)","name":"options.delay","required":false,"types":["untyped"]},{"description":"low, default or high - see AsyncCallbackPriorityEnum GraphQL Object","name":"options.priority","required":false,"types":["untyped"]},{"description":"the number of time to re-try job upon failing. Default is 1, maximum is 5","name":"options.max_attempts","required":false,"types":["untyped"]},{"description":"your label of the job, which would help you identify it","name":"options.source_name","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"Run background code from partial\nThe following code will run all the log queries in the background, not earlier than 0.5 minute (30 seconds) since the execution. You will only have access to variables\nexplicitly provided to the background tag: \\\"data\\\" and \\\"hey\\\". Note that you will not have access to the \\\"my_data\\\" variable. Also note\nthat the result of this background tag will not be rendered, and you will not have access to any variable inside the background tag.\n\n# app/views/partials/example_partial.liquid\n{% liquid\n log not_available_in_background # Will be null, as this variable was not passed to the background tag\n log data # You will see { \\\"hello\\\": \\\"world\\\" }, as it was provided to the background tag\n log hey # You will see \\\"hello\\\" as it was provided to the background tag\n log context # You will copy the current request context and make it available in the background\n assign not_available_outside = \\\"You will not see me\\\"\n\n%}\n\n# app/views/pages/test.liquid\n{% liquid\n assign my_data = null | hash_merge: hello: \\\"world\\\"\n assign not_available_in_job = \\\"You will not see me \\\"\n background job_id = 'example_partial', delay: 0.1, max_attempts: 3, source_name: 'custom_job', data: my_data, hey: 'hello'\n\n # This variable will be rendered in the background, meaning you won't see anything on the page\n echo not_available_outside\n%}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Deprecated\nThe following code will run all the log queries in the background, not earlier than 0.5 minute (30 seconds) since the execution. You will only have access to variables\nexplicitly provided to the background tag: \\\"data\\\" and \\\"hey\\\". Note that you will not have access to the \\\"my_data\\\" variable. Also note\nthat the result of this background tag will not be rendered, and you will not have access to any variable inside the background tag.\n\n{% parse_json my_data %}{ \\\"hello\\\": \\\"world\\\" }{% endparse_json %}\n{% assign not_available_in_background = \\\"You will not see me\\\" %}\n{% background priority: 'low', delay: 0.5, max_attempts: 3, source_name: \\\"my custom job\\\", data: my_data, hey: 'hello' %}\n {% log not_available_in_background %} {% comment %}Will be null, as this variable was not passed to the background tag {% endcomment %}\n {% log data %} {% comment %}You will see { \\\"hello\\\": \\\"world\\\" }, as it was provided to the background tag{% endcomment %}\n {% log hey %} {% comment %}You will see \\\"hello\\\" as it was provided to the background tag{% endcomment %}\n {% log context %} {% comment %}You will copy the current request context and make it available in the background{% endcomment %}\n {% assign not_available_outside = \\\"You will not see me\\\" %}\n {{ not_available_outside }} {% comment %}This variable will be rendered in the background, meaning you won't see anything on the page{% endcomment %}\n{% endbackground %}\n{{ not_available_outside }} {% comment %}This will be blank, because the assign will happen in the background - you won't have access to it here{% endcomment %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Stops a [`for` loop](/docs/api/liquid/tags/for) from iterating.","name":"break","syntax":"{% break %}","syntax_keywords":[],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..5) -%}\n {%- if i == 4 -%}\n {% break %}\n {%- else -%}\n {{ i }}\n {%- endif -%}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Checks if there's string cached for the given key. If yes, it just returns the value without processing\nanything inside the cache tag, otherwise it executes code, stores the result in the cache.\nWhen you hit the page with such code for the first time, the code will be executed and hence it will iterate through the loop\nand generate random strings. However, then the result of the block will be cached and all the following requests within 20 seconds\nwould not invoke the code - instead, it would just take the value from the cache. The output will not change. When the cache expires,\nthe code will be evaluated again, producing another set of random string.\nCache is automatically invalidated if any changes are applied to any view/translation.","syntax":"{% cache 'this is my key', expire: 20 %}\n \u003cul\u003e\n {% for i in (1..100) %}\n \u003cli\u003e{{ 18 | random_string }}\u003c/li\u003e\n {% endfor %}\n \u003c/ul\u003e\n{% endcache %}","name":"cache","parameters":[{"description":"the key which should uniquely identify the cached fragment","name":"key","required":false,"types":["untyped"]},{"description":"optional. number of seconds since populating the cache to expiration","name":"expire","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% cache 'this is my key', expire: 20 %}\n \u003cul\u003e\n {% for i in (1..100) %}\n \u003cli\u003e{{ 18 | random_string }}\u003c/li\u003e\n {% endfor %}\n \u003c/ul\u003e\n{% endcache %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json pagesUpdatedAt %}\n {%- cache pagesUpdatedAtCache -%}\n {%- graphql g = 'pages_updated_at' | dig: 'admin_pages', 'results' -%}\n {{- g -}}\n {%- endcache -%}\n{% endparse_json %}\n{%- export pagesUpdatedAt, namespace: 'nav' -%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"variable","deprecated":false,"deprecation_reason":"","description":"You can create complex strings with Liquid logic and variables.","parameters":[],"summary":"Creates a new variable with a string value.","name":"capture","syntax":"{% capture variable %}\n value\n{% endcapture %}","syntax_keywords":[{"keyword":"variable","description":"The name of the variable being created."},{"keyword":"value","description":"The value you want to assign to the variable."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{%- assign up_title = product.title | upcase -%}\n{%- assign down_title = product.title | downcase -%}\n{%- assign show_up_title = true -%}\n\n{%- capture title -%}\n {% if show_up_title -%}\n Upcase title: {{ up_title }}\n {%- else -%}\n Downcase title: {{ down_title }}\n {%- endif %}\n{%- endcapture %}\n\n{{ title }}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Renders a specific expression depending on the value of a specific variable.","name":"case","syntax":"{% case variable %}\n {% when first_value %}\n first_expression\n {% when second_value %}\n second_expression\n {% else %}\n third_expression\n{% endcase %}","syntax_keywords":[{"keyword":"variable","description":"The name of the variable you want to base your case statement on."},{"keyword":"first_value","description":"A specific value to check for."},{"keyword":"second_value","description":"A specific value to check for."},{"keyword":"first_expression","description":"An expression to be rendered when the variable's value matches `first_value`."},{"keyword":"second_expression","description":"An expression to be rendered when the variable's value matches `second_value`."},{"keyword":"third_expression","description":"An expression to be rendered when the variable's value has no match."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% case product.type %}\n {% when 'Health' %}\n This is a health potion.\n {% when 'Love' %}\n This is a love potion.\n {% else %}\n This is a potion.\n{% endcase %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Multiple values","description":"A `when` tag can accept multiple values. When multiple values are provided, the expression is returned when the variable matches any of the values inside of the tag.\nProvide the values as a comma-separated list, or separate them using an `or` operator.\n","syntax":"{% case variable %}\n {% when first_value or second_value or third_value %}\n first_expression\n {% when fourth_value, fifth_value, sixth_value %}\n second_expression\n {% else %}\n third_expression\n{% endcase %}\n","path":"/products/health-potion","raw_liquid":"{% case product.tags %}\n {% when 'Love' or 'Luck' %}\n This is a love or luck potion.\n {% when 'Strength','Health' %}\n This is a strength or health potion.\n {% else %}\n This is a potion.\n{% endcase %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"Any text inside `comment` tags won't be output, and any Liquid code will be parsed, but not executed.","parameters":[],"summary":"Prevents an expression from being rendered or output.","name":"comment","syntax":"{% comment %}\n content\n{% endcomment %}","syntax_keywords":[{"keyword":"content","description":"The content of the comment."}],"examples":[{"name":"Inline comments","description":"Inline comments prevent an expression inside of a tag `{% %}` from being rendered or output.\n\nYou can use inline comment tags to annotate your code, or to temporarily prevent logic in your code from executing.\n\nYou can create multi-line inline comments. However, each line in the tag must begin with a `#`, or a syntax error will occur.\n","syntax":"{% # content %}","path":"/","raw_liquid":"{% # this is a comment %}\n\n{% # for i in (1..3) -%}\n {{ i }}\n{% # endfor %}\n\n{%\n ###############################\n # This is a comment\n # across multiple lines\n ###############################\n%}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Inline comments inside `liquid` tags","description":"You can use inline comment tags inside [`liquid` tags](/docs/api/liquid/tags/liquid). The tag must be used for each line that you want to comment.\n","syntax":"","path":"/","raw_liquid":"{% liquid\n # this is a comment\n assign topic = 'Learning about comments!'\n echo topic\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Stores a block of markup in an identifier for later use.\nRender it later with `yield` tag.","syntax":"{% content_for 'header' %}\n Hello world\n{% endcontent_for %}","name":"content_for","parameters":[{"description":"the markups will be stored under this name","name":"name","required":false,"types":["untyped"]},{"description":"optional. If the flush parameter is true content_for replaces the blocks it is given instead of appending content to the existing one","name":"flush","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% content_for 'header' %}\n Hello world\n{% endcontent_for %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Set locale in context to given language","syntax":"{% context language: 'de' %}","name":"context","parameters":[{"description":"language 2 letter","name":"language","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% context language: 'de' %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Causes a [`for` loop](/docs/api/liquid/tags/for) to skip to the next iteration.","name":"continue","syntax":"{% continue %}","syntax_keywords":[],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..5) -%}\n {%- if i == 4 -%}\n {% continue %}\n {%- else -%}\n {{ i }}\n {%- endif -%}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"The `cycle` tag must be used inside a `for` loop.\n\n\u003e Tip:\n\u003e Use the `cycle` tag to output text in a predictable pattern. For example, to apply odd/even classes to rows in a table.","parameters":[],"summary":"Loops through a group of strings and outputs them one at a time for each iteration of a [`for` loop](/docs/api/liquid/tags/for).","name":"cycle","syntax":"{% cycle string, string, ... %}","syntax_keywords":[],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..4) -%}\n {% cycle 'one', 'two', 'three' %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Create unique cycle groups","description":"If you include multiple `cycle` tags with the same parameters, in the same template, then each set of tags is treated as the same group. This means that it's possible for a `cycle` tag to output any of the provided strings, instead of always starting at the first string.\nTo account for this, you can specify a group name for each `cycle` tag.\n","syntax":"{% cycle string: string, string, ... %}","path":"/","raw_liquid":"\u003c!-- Iteration 1 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'one', 'two', 'three' %}\n{%- endfor %}\n\n\u003c!-- Iteration 2 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'one', 'two', 'three' %}\n{%- endfor %}\n\n\u003c!-- Iteration 3 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'group_1': 'one', 'two', 'three' %}\n{%- endfor %}\n\n\u003c!-- Iteration 4 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'group_2': 'one', 'two', 'three' %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"variable","deprecated":false,"deprecation_reason":"","description":"Variables that are declared with `decrement` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[snippets](/themes/architecture#snippets) included in the file.\n\nSimilarly, variables that are created with `decrement` are independent from those created with [`assign`](/docs/api/liquid/tags/assign)\nand [`capture`](/docs/api/liquid/tags/capture). However, `decrement` and [`increment`](/docs/api/liquid/tags/increment) share\nvariables.","parameters":[],"summary":"Creates a new variable, with a default value of -1, that's decreased by 1 with each subsequent call.","name":"decrement","syntax":"{% decrement variable_name %}","syntax_keywords":[{"keyword":"variable_name","description":"The name of the variable being decremented."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% decrement variable %}\n{% decrement variable %}\n{% decrement variable %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"Using the `echo` tag is the same as wrapping an expression in curly brackets (`{{` and `}}`). However, unlike the curly\nbracket method, you can use the `echo` tag inside [`liquid` tags](/docs/api/liquid/tags/liquid).\n\n\u003e Tip:\n\u003e You can use [filters](/docs/api/liquid/filters) on expressions inside `echo` tags.","parameters":[],"summary":"Outputs an expression.","name":"echo","syntax":"{% liquid\n echo expression\n%}","syntax_keywords":[{"keyword":"expression","description":"The expression to be output."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% echo product.title %}\n\n{% liquid\n echo product.price | money\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Allows you to specify a default expression to execute when a [`for` loop](/docs/api/liquid/tags/for) has zero length.","name":"else","syntax":"{% for variable in array %}\n first_expression\n{% else %}\n second_expression\n{% endfor %}","syntax_keywords":[{"keyword":"variable","description":"The current item in the array."},{"keyword":"array","description":"The array to iterate over."},{"keyword":"first_expression","description":"The expression to render for each iteration."},{"keyword":"second_expression","description":"The expression to render if the loop has zero length."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/empty","raw_liquid":"{% for product in collection.products %}\n {{ product.title }}\u003cbr\u003e\n{% else %}\n There are no products in this collection.\n{% endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"You can use the `else` tag with the following tags:\n\n- [`case`](/docs/api/liquid/tags/case)\n- [`if`](/docs/api/liquid/tags/if)\n- [`unless`](/docs/api/liquid/tags/unless)","parameters":[],"summary":"Allows you to specify a default expression to execute when no other condition is met.","name":"else","syntax":"{% else %}\n expression","syntax_keywords":[{"keyword":"expression","description":"The expression to render if no other condition is met."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% if product.available %}\n This product is available!\n{% else %}\n This product is sold out!\n{% endif %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Makes variables defined inside partial accessible anywhere via context.exports.`namespace`","syntax":"{% liquid\n assign a = 'value for a'\n assign b = 'value for b'\n export a, b, namespace: 'my_hash'\n%}\n\n{{ context.exports.my_hash }} =\u003e { \\\"a\\\": \\\"value for a\\\", \\\"b\\\": \\\"value for b\\\" }\n{% parse_json company %}\n{\n \\\"name\\\": \\\"platformOS\\\",\n \\\"technologies\\\": [\\\"liquid\\\", \\\"graphql\\\"],\n \\\"countries\\\": { \\\"USA\\\": 5, \\\"Poland\\\": 5, \\\"Romania\\\": 2 }\n}\n{% endparse_json %}\n\n{% export company, namespace: 'data' %}\n\n{{ context.exports.data }} =\u003e\n {\\\"company\\\"=\u003e{\\\"name\\\"=\u003e\\\"platformOS\\\", \\\"technologies\\\"=\u003e[\\\"liquid\\\", \\\"graphql\\\"], \\\"countries\\\"=\u003e{\\\"USA\\\"=\u003e5, \\\"Poland\\\"=\u003e5, \\\"Romania\\\"=\u003e2}}}\n{{ context.exports.data.company.technologies }} =\u003e liquidgraphql\n{{ context.exports.data.company.name }} =\u003e platformOS","name":"export","parameters":[{"description":"variable to be stored inside the namespace","name":"variable","required":false,"types":["untyped"]},{"description":"namespace under which variable will be in context.exports","name":"namespace","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n assign a = 'value for a'\n assign b = 'value for b'\n export a, b, namespace: 'my_hash'\n%}\n\n{{ context.exports.my_hash }} =\u003e { \\\"a\\\": \\\"value for a\\\", \\\"b\\\": \\\"value for b\\\" }\n{% parse_json company %}\n{\n \\\"name\\\": \\\"platformOS\\\",\n \\\"technologies\\\": [\\\"liquid\\\", \\\"graphql\\\"],\n \\\"countries\\\": { \\\"USA\\\": 5, \\\"Poland\\\": 5, \\\"Romania\\\": 2 }\n}\n{% endparse_json %}\n\n{% export company, namespace: 'data' %}\n\n{{ context.exports.data }} =\u003e\n {\\\"company\\\"=\u003e{\\\"name\\\"=\u003e\\\"platformOS\\\", \\\"technologies\\\"=\u003e[\\\"liquid\\\", \\\"graphql\\\"], \\\"countries\\\"=\u003e{\\\"USA\\\"=\u003e5, \\\"Poland\\\"=\u003e5, \\\"Romania\\\"=\u003e2}}}\n{{ context.exports.data.company.technologies }} =\u003e liquidgraphql\n{{ context.exports.data.company.name }} =\u003e platformOS","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"You can do a maximum of 50 iterations with a `for` loop. If you need to iterate over more than 50 items, then use the\n[`paginate` tag](/docs/api/liquid/tags/paginate) to split the items over multiple pages.\n\n\u003e Tip:\n\u003e Every `for` loop has an associated [`forloop` object](/docs/api/liquid/objects/forloop) with information about the loop.","parameters":[{"description":"The number of iterations to perform.","name":"limit","required":false,"types":["number"]},{"description":"The 1-based index to start iterating at.","name":"offset","required":false,"types":["number"]},{"description":"A custom numeric range to iterate over.","name":"range","required":false,"types":["untyped"]},{"description":"Iterate in reverse order.","name":"reversed","required":false,"types":["untyped"]}],"summary":"Renders an expression for every item in an array.","name":"for","syntax":"{% for variable in array %}\n expression\n{% endfor %}","syntax_keywords":[{"keyword":"variable","description":"The current item in the array."},{"keyword":"array","description":"The array to iterate over."},{"keyword":"expression","description":"The expression to render for each iteration."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products -%}\n {{ product.title }}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"limit","description":"You can limit the number of iterations using the `limit` parameter.","syntax":"{% for variable in array limit: number %}\n expression\n{% endfor %}\n","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products limit: 2 -%}\n {{ product.title }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"offset","description":"You can specify a 1-based index to start iterating at using the `offset` parameter.","syntax":"{% for variable in array offset: number %}\n expression\n{% endfor %}\n","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products offset: 2 -%}\n {{ product.title }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"range","description":"Instead of iterating over specific items in an array, you can specify a numeric range to iterate over.\n\n\u003e Note:\n\u003e You can define the range using both literal and variable values.\n","syntax":"{% for variable in (number..number) %}\n expression\n{% endfor %}\n","path":"/collections/all","raw_liquid":"{% for i in (1..3) -%}\n {{ i }}\n{%- endfor %}\n\n{%- assign lower_limit = 2 -%}\n{%- assign upper_limit = 4 -%}\n\n{% for i in (lower_limit..upper_limit) -%}\n {{ i }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"reversed","description":"You can iterate in reverse order using the `reversed` parameter.","syntax":"{% for variable in array reversed %}\n expression\n{% endfor %}\n","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products reversed -%}\n {{ product.title }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Used to generate a html form element for a resource. Use within `form configuration`.\nInside the tag you can use `form_builder` variable.","syntax":"{% form %}\n {{ form_builder }}\n{% endform %}","name":"form","parameters":[{"description":"set id attribute in `\u003cform id=\"\"\u003e` element","name":"html-id","required":false,"types":["untyped"]},{"description":"add `novalidate` attribute to `\u003cform novalidate\u003e` element","name":"html-novalidate","required":false,"types":["untyped"]},{"description":"add css class `\u003cform class=\"\"\u003e` element","name":"html-class","required":false,"types":["untyped"]},{"description":"add `enctype=\"multipart/form-data\"` attribute to `\u003cform enctype=\"multipart/form-data\"\u003e` element.\nMultipart is enabled by default","name":"html-multipart","required":false,"types":["untyped"]},{"description":"[String] add data attribute to `\u003cform data-[attr]=\"\"\u003e` element","name":"html-data-","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {{ form_builder }}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form html-id: 'someid', html-novalidate: true, html-class: 'big-form green-form', html-data-user-id: '12345', html-multipart: false %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to store a variable returned by a partial. Partial needs to return data with `return` tag.\nAll variables needs to be passed explicitly to function. Variables from upper scope are not visible in function.\n*Note:* `context` is not available inside the function partial unless explicitly passed as a variable.","syntax":"{% function res = 'path/to/my/partial', arg1: 'hello' %}","name":"function","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% function res = 'path/to/my/partial', arg1: 'hello' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"# path/to/my/partial\n{% liquid\n assign res = 'hello' | append: foo | append: ' ' | append: context.location.host\n return res\n%}\n# path/to/my/partial\n\n{% liquid\n assign foo = 'hello'\n function res = 'path/to/my/partial', foo: foo, context: context\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Used to execute GraphQL query stored in a file or invoke GraphQL query inline. All arguments provided to the tag will be passed to GraphQL.\nIt returns a hash with the data or the errors that occurred (for example, variable type mismatch, required variable not provided,\nsyntax error) etc.","syntax":"Invoke query \\\"get_models\\\" and store the result in variable \\\"g\\\":\n{% graphql g = \\\"get_models\\\", model_id: context.params.slug2 %}","name":"graphql","parameters":[{"description":"name of the GraphQL query. For get_users.graphql file name of the query is get_users","name":"query_name","required":false,"types":["untyped"]},{"description":"optional. key:value pair(s) which will be passed to GraphQL query. For example, if\nyour query looks like `query my_query($email: String!)`, then you can provide `email: \"my-email@example.com\"`","name":"arguments","required":false,"types":["untyped"]},{"description":"optional. Either a Hash or a String) of the arguments which will be passed to GraphQL query. See examples below.","name":"args","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"Invoke query \\\"get_models\\\" and store the result in variable \\\"g\\\":\n{% graphql g = \\\"get_models\\\", model_id: context.params.slug2 %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Chain filters to extract results in one line:\n{% graphql g = \\\"get_models\\\", model_id: context.params.slug2 | fetch: 'models' | fetch: 'results' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Pass all arguments at once as a hash to have graphql tag in one line and/or compose arguments hash dynamically:\n{% parse_json arguments %}\n {\n \\\"model_id\\\": {{ context.params.slug2 | json }},\n \\\"user_id\\\": {{ context.params.user_id | json }}\n }\n{% endparse_json %}\n\n{% graphql g = \\\"get_models\\\", args: arguments %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Pass all arguments at once as a JSON string:\n\n{% capture arguments %}\n{\n \\\"per_page\\\": 20,\n \\\"page\\\": 2\n}\n{% endcapture %}\n\n{% graphql g = \\\"get_models\\\", args: arguments %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Invoke inline query and store the result in variable \\\"g\\\". This is recommended for one-time used queries.\n\n{% graphql g, id: context.params.slug2, message: \\\"new message\\\" %}\n mutation set_message($id: ID!, $message: String!) {\n model_update(\n id: $id\n model: {\n properties: [{ name: \\\"message\\\", value: $message }]\n }\n ) {\n id\n message: property(name: \\\"message\\\")\n }\n }\n{% endgraphql %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to easily modify a Hash with a syntax same as assign tag.","syntax":"{% parse_json my_hash %}{ \\\"a\\\": { \\\"b\\\": { \\\"c\\\": \\\"12\\\", \\\"d\\\": \\\"hello\\\" } } }{% endparse_json %}\n{% hash_assign my_hash[\\\"a\\\"][\\\"e\\\"] = \\\"assign\\\" | upcase %}\n{{ my_hash }} =\u003e {\\\"a\\\":{\\\"b\\\":{\\\"c\\\":\\\"12\\\",\\\"d\\\":\\\"hello\\\"},\\\"e\\\":\\\"ASSIGN\\\"}}","name":"hash_assign","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \\\"a\\\": { \\\"b\\\": { \\\"c\\\": \\\"12\\\", \\\"d\\\": \\\"hello\\\" } } }{% endparse_json %}\n{% hash_assign my_hash[\\\"a\\\"][\\\"e\\\"] = \\\"assign\\\" | upcase %}\n{{ my_hash }} =\u003e {\\\"a\\\":{\\\"b\\\":{\\\"c\\\":\\\"12\\\",\\\"d\\\":\\\"hello\\\"},\\\"e\\\":\\\"ASSIGN\\\"}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \\\"a\\\": { \\\"b\\\": { \\\"c\\\": \\\"12\\\", \\\"d\\\": \\\"hello\\\" } } }{% endparse_json %}\n{% hash_assign my_hash[\\\"a\\\"][\\\"b\\\"][\\\"d\\\"] = \\\"bye\\\" | upcase %}\n{{ my_hash }} =\u003e {\\\"a\\\":{\\\"b\\\":{\\\"c\\\":\\\"12\\\",\\\"d\\\":\\\"BYE\\\"}}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \\\"a\\\": { \\\"b\\\": { \\\"c\\\": \\\"12\\\", \\\"d\\\": \\\"hello\\\" } } }{% endparse_json %}\n{% hash_assign my_hash[\\\"a\\\"][\\\"b\\\"] = null %}\n{{ my_hash }} =\u003e {\\\"a\\\":{\\\"b\\\":null}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \\\"a\\\": { \\\"b\\\": { \\\"c\\\": \\\"12\\\", \\\"d\\\": \\\"hello\\\" } } }{% endparse_json %}\n{% hash_assign my_hash[\\\"a\\\"][\\\"b\\\"][\\\"c\\\"][\\\"e\\\"] = \\\"bye\\\" | upcase %}) =\u003e HashAssignTagError: Liquid error: my_hash[a][b][c] is 12, expected Hash","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Renders an expression if a specific condition is `true`.","name":"if","syntax":"{% if condition %}\n expression\n{% endif %}","syntax_keywords":[{"keyword":"condition","description":"The condition to evaluate."},{"keyword":"expression","description":"The expression to render if the condition is met."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/glacier-ice","raw_liquid":"{% if product.compare_at_price \u003e product.price %}\n This product is on sale!\n{% endif %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"elsif","description":"You can use the `elsif` tag to check for multiple conditions.","syntax":"","path":"/products/health-potion","raw_liquid":"{% if product.type == 'Love' %}\n This is a love potion!\n{% elsif product.type == 'Health' %}\n This is a health potion!\n{% endif %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"theme","deprecated":true,"deprecation_reason":"Deprecated because the way that variables are handled reduces performance and makes code harder to both read and maintain.\n\nThe `include` tag has been replaced by [`render`](/docs/api/liquid/tags/render).","description":"Inside the snippet, you can access and alter variables that are [created](/docs/api/liquid/tags/variable-tags) outside of the\nsnippet.","parameters":[],"summary":"Renders a [snippet](/themes/architecture#snippets).","name":"include","syntax":"{% include 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the snippet to render, without the `.liquid` extension."}],"examples":[]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"This tag should be used to render forms defined in forms directory","syntax":"{% include_form 'signup_form' %}","name":"include_form","parameters":[{"description":"name of the form configuration from forms directory","name":"form_name","required":false,"types":["untyped"]},{"description":"id of the resource you want to edit","name":"id","required":false,"types":["untyped"]},{"description":"name of the resource type, f.e. name of custom_model_type, transactable_type, user_profile_type","name":"parent_resource_id","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% include_form 'signup_form' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% include_form 'edit_user', id: user.id %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% include_form 'manager_invite_to_interview', parent_resource_id: 'invitation', user: g.user %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"variable","deprecated":false,"deprecation_reason":"","description":"Variables that are declared with `increment` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[snippets](/themes/architecture#snippets) included in the file.\n\nSimilarly, variables that are created with `increment` are independent from those created with [`assign`](/docs/api/liquid/tags/assign)\nand [`capture`](/docs/api/liquid/tags/capture). However, `increment` and [`decrement`](/docs/api/liquid/tags/decrement) share\nvariables.","parameters":[],"summary":"Creates a new variable, with a default value of 0, that's increased by 1 with each subsequent call.","name":"increment","syntax":"{% increment variable_name %}","syntax_keywords":[{"keyword":"variable_name","description":"The name of the variable being incremented."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% increment variable %}\n{% increment variable %}\n{% increment variable %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"Because the tags don't have delimeters, each tag needs to be on its own line.\n\n\u003e Tip:\n\u003e Use the [`echo` tag](/docs/api/liquid/tags/echo) to output an expression inside `liquid` tags.","parameters":[],"summary":"Allows you to have a block of Liquid without delimeters on each tag.","name":"liquid","syntax":"{% liquid\n expression\n%}","syntax_keywords":[{"keyword":"expression","description":"The expression to be rendered inside the `liquid` tag."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% liquid\n # Show a message that's customized to the product type\n\n assign product_type = product.type | downcase\n assign message = ''\n\n case product_type\n when 'health'\n assign message = 'This is a health potion!'\n when 'love'\n assign message = 'This is a love potion!'\n else\n assign message = 'This is a potion!'\n endcase\n\n echo message\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Print information to environment logs. To view logs run `pos-cli gui serve \u003cenvironment\u003e` in your application directory and go to `http://localhost:3333/Logs`. If you prefer seeing logs in the terminal, run `pos-cli gui logs \u003cenvironment\u003e`","syntax":"{% log 'hello world' %}","name":"log","parameters":[{"description":"Any object that can be printed","name":"message","required":false,"types":["untyped"]},{"description":"type of log entry. Use it to tag your logs to make it easier to differentiate logs. If you set it to 'error' pos-cli will also notify your OS about it if your OS supports it.","name":"type","required":false,"types":["untyped"]},{"description":"environment where the entry should be created; can be any of 'all', 'staging', 'production'. Default: 'all'","name":"env","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log 'hello world' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log params, type: 'request-params' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log user.id, type: 'debug' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log context.current_user, type: 'error' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log context.current_user, type: 'error', env: 'staging' %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"Because [`for` loops](/docs/api/liquid/tags/for) are limited to 50 iterations per page, you need to use the `paginate` tag to\niterate over an array that has more than 50 items. The following arrays can be paginated:\n\n- [`all_products`](/docs/api/liquid/objects/all_products)\n- [`article.comments`](/docs/api/liquid/objects/article#article-comments)\n- [`blog.articles`](/docs/api/liquid/objects/blog#blog-articles)\n- [`collections`](/docs/api/liquid/objects/collections)\n- [`collection.products`](/docs/api/liquid/objects/collection#collection-products)\n- [`customer.addresses`](/docs/api/liquid/objects/customer#customer-addresses)\n- [`customer.orders`](/docs/api/liquid/objects/customer#customer-orders)\n- [`pages`](/docs/api/liquid/objects/pages)\n- [`search.results`](/docs/api/liquid/objects/search#search-results)\n- [`collection_list` settings](/themes/architecture/settings/input-settings#collection_list)\n- [`product_list` settings](/themes/architecture/settings/input-settings#product_list)\n\nWithin the `paginate` tag, you have access to the [`paginate` object](/docs/api/liquid/objects/paginate). You can use this\nobject, or the [`default_pagination` filter](/docs/api/liquid/filters/default_pagination), to build page navigation.","parameters":[{"description":"The number of pages to display in the pagination.","name":"window_size","required":false,"types":["string"]}],"summary":"Splits an array's items across multiple pages.","name":"paginate","syntax":"{% paginate array by page_size %}\n {% for item in array %}\n forloop_content\n {% endfor %}\n{% endpaginate %}","syntax_keywords":[{"keyword":"array","description":"The array to be looped over."},{"keyword":"page_size","description":"The number of array items to include per page, between 1 and 50."},{"keyword":"item","description":"An item in the array being looped."},{"keyword":"forloop_content","description":"Content for each loop iteration."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/all","raw_liquid":"{% paginate collection.products by 5 %}\n {% for product in collection.products -%}\n {{ product.title }}\n {%- endfor %}\n\n {{- paginate | default_pagination }}\n{% endpaginate %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Paginating setting arrays","description":"To allow the pagination of `product_list` and `collection_list` settings to operate independently from other paginated lists on a page, these lists use a pagination query parameter with a unique key. The key is automatically assigned by the `paginate` tag, and you don't need to reference the key in your code. However, you can access the key using [`paginate.page_param`](/docs/api/liquid/objects/paginate#paginate-page_param).\n\n\u003e Tip:\n\u003e To paginate two arrays independently without refreshing the entire page, you can use the [Section Rendering API](/api/section-rendering).\n","syntax":"","path":"/","raw_liquid":"","parameter":false,"display_type":"text","show_data_tab":true},{"name":"window_size","description":"Set the window size of the pagination. The window size is the number of pages that should be visible in the pagination navigation.\n","syntax":"{% paginate collection.products by 3, window_size: 1 %}","path":"/collections/all","raw_liquid":"{% paginate collection.products by 3, window_size: 1 %}\n {% for product in collection.products -%}\n {{ product.title }}\n {%- endfor %}\n\n {{- paginate | default_pagination }}\n{% endpaginate %}","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Captures and parses the JSON string inside of the opening and closing tags and assigns it to a variable.","syntax":"{% parse_json car %}\n { \\\"type\\\": \\\"SUV\\\", \\\"gearbox\\\": \\\"AT\\\" }\n{% endparse_json %}\n\n{{ car }} =\u003e {\\\"type\\\"=\u003e\\\"SUV\\\", \\\"gearbox\\\"=\u003e\\\"AT\\\"}\n{{ car.type }} =\u003e SUV","name":"parse_json","parameters":[{"description":"variable name that will be used to assign contents after it is parsed","name":"variable_name","required":false,"types":["untyped"]},{"description":"valid JSON string to be assigned","name":"content","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json car %}\n { \\\"type\\\": \\\"SUV\\\", \\\"gearbox\\\": \\\"AT\\\" }\n{% endparse_json %}\n\n{{ car }} =\u003e {\\\"type\\\"=\u003e\\\"SUV\\\", \\\"gearbox\\\"=\u003e\\\"AT\\\"}\n{{ car.type }} =\u003e SUV","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json cars %}\n [\n { \\\"maker\\\": \\\"Honda\\\", \\\"model\\\": \\\"CRX\\\" },\n { \\\"maker\\\": \\\"Subaru\\\", \\\"model\\\": \\\"Forester\\\"},\n { \\\"maker\\\": \\\"Lexus\\\", \\\"model\\\": \\\"LFA\\\" }\n ]\n{% endparse_json %}\n\n{{ cars }} =\u003e {\\\"maker\\\"=\u003e\\\"Honda\\\", \\\"model\\\"=\u003e\\\"CRX\\\"}{\\\"maker\\\"=\u003e\\\"Subaru\\\", \\\"model\\\"=\u003e\\\"Forester\\\"}{\\\"maker\\\"=\u003e\\\"Lexus\\\", \\\"model\\\"=\u003e\\\"LFA\\\"}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"In order to create JSON object from exsting values print them using `json` filter.\nThis is required only for strings and will escape properly `\\\"` and `'` characters.\nOther types will be handled automatically.\n\n{% parse_json nested %}\n {\n \\\"price\\\": 100\n }\n{% endparse_json %}\n{% assign color = \\\"red\\\" %}\n{% assign car = 'Mazda \\\"5\\\"' %}\n{% parse_json data %}\n {\n \\\"color\\\": {{ color | json }},\n \\\"car\\\": {{ car | json }},\n \\\"nested\\\": {{ nested }}\n }\n{% endparse_json %}\n\n{{ data }} =\u003e {\\\"color\\\":\\\"red\\\",\\\"car\\\":\\\"Mazda \\\\\"5\\\\\"\\\",\\\"nested\\\":{\\\"price\\\":100}}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Print variable, skipping any additional sanitization. It provides a way to display a variable which consists of both safe and unsafe html.\nWarning: Do not use it with data entered by users as it is gonna cause XSS.","syntax":"{% liquid\n assign invokable_script = \\\"\u003cscript\u003ealert('I will be executed')\u003c/script\u003e\\\"\n assign malicious_script = \\\"\u003cscript\u003ealert('I should be escaped')\u003c/script\u003e\\\"\n%}\n{% capture result %}\n {{ malicious_script }}{{ invokable_script | html_safe }}\n{% endcapture %}\n{% print result %}","name":"print","parameters":[{"description":"Variable containing safe and potentially unsafe HTML","name":"variable","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n assign invokable_script = \\\"\u003cscript\u003ealert('I will be executed')\u003c/script\u003e\\\"\n assign malicious_script = \\\"\u003cscript\u003ealert('I should be escaped')\u003c/script\u003e\\\"\n%}\n{% capture result %}\n {{ malicious_script }}{{ invokable_script | html_safe }}\n{% endcapture %}\n{% print result %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Outputs any Liquid code as text instead of rendering it.","name":"raw","syntax":"{% raw %}\n expression\n{ % endraw %}","syntax_keywords":[{"keyword":"expression","description":"The expression to be output without being rendered."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% raw %}\n{{ 2 | plus: 2 }} equals 4.\n{ % endraw %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Redirects browser to target","syntax":"{% redirect_to '/dashboard' %}","name":"redirect_to","parameters":[{"description":"path or url","name":"target","required":false,"types":["untyped"]},{"description":"3xx HTTP code, default 302","name":"status","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% redirect_to '/dashboard' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% redirect_to 'https://example.com/signup' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% redirect_to '/dashboard', status: 301 %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"theme","deprecated":false,"deprecation_reason":"","description":"Inside snippets and app blocks, you can't directly access variables that are [created](/docs/api/liquid/tags/variable-tags) outside\nof the snippet or app block. However, you can [specify variables as parameters](/docs/api/liquid/tags/render#render-passing-variables-to-a-snippet)\nto pass outside variables to snippets.\n\nWhile you can't directly access created variables, you can access global objects, as well as any objects that are\ndirectly accessible outside the snippet or app block. For example, a snippet or app block inside the [product template](/themes/architecture/templates/product)\ncan access the [`product` object](/docs/api/liquid/objects/product), and a snippet or app block inside a [section](/themes/architecture/sections)\ncan access the [`section` object](/docs/api/liquid/objects/section).\n\nOutside a snippet or app block, you can't access variables created inside the snippet or app block.\n\n\u003e Note:\n\u003e When you render a snippet using the `render` tag, you can't use the [`include` tag](/docs/api/liquid/tags/include)\n\u003e inside the snippet.","parameters":[],"summary":"Renders a [snippet](/themes/architecture#snippets) or [app block](/themes/architecture/sections/section-schema#render-app-blocks).","name":"render","syntax":"{% render 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the snippet to render, without the `.liquid` extension."}],"examples":[{"name":"for","description":"You can render a snippet for every item in an array using the `for` parameter. You can also supply an optional `as` parameter to be able to reference the current item in the iteration inside the snippet.\nAdditionally, you can access a [`forloop` object](/docs/api/liquid/objects/forloop) for the loop inside the snippet.\n","syntax":"{% render 'filename' for array as item %}","path":"/","raw_liquid":"","parameter":true,"display_type":"text","show_data_tab":true},{"name":"Passing variables to a snippet","description":"Variables that have been [created](/docs/api/liquid/tags/variable-tags) outside of a snippet can be passed to a snippet as parameters on the `render` tag.\n\n\u003e Note:\n\u003e Any changes that are made to a passed variable apply only within the snippet.\n","syntax":"{% render 'filename', variable: value %}","path":"/","raw_liquid":"","parameter":true,"display_type":"text","show_data_tab":true},{"name":"with","description":"You can pass a single object to a snippet using the `with` parameter. You can also supply an optional `as` parameter to specify a custom name to reference the object inside the snippet.\n","syntax":"{% render 'filename' with object as name %}","path":"/","raw_liquid":"","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows you to set additional HTTP headers for the response.","syntax":"{% response_headers '{\\\"foo\\\": \\\"bar\\\"}' %}","name":"response_headers","parameters":[{"description":"headers as JSON string, default {}","name":"headers","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_headers '{\\\"foo\\\": \\\"bar\\\"}' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_headers '{\\\"Content-Type\\\": \\\"application/json\\\", \\\"X-Frame-Options\\\": \\\"somevalue\\\" }' %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows you to set HTTP status for the response. Default 200.","syntax":"{% response_status 204 %}","name":"response_status","parameters":[{"description":"HTTP status, default 200","name":"status","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_status 204 %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_status 404 %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Used inside a partial invoked by a function tag to return a variable","syntax":"{% liquid\n assign result = 1 | plus: 3\n return result\n%}","name":"return","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n assign result = 1 | plus: 3\n return result\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Stores data during user's session\nSets field of given name to given value in context.session","syntax":"{% session foo = 'bar' %}\n{{ context.session | json }} =\u003e { \\\"foo\\\": \\\"bar\\\" }","name":"session","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% session foo = 'bar' %}\n{{ context.session | json }} =\u003e { \\\"foo\\\": \\\"bar\\\" }","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign bar = \\\"42\\\" }\n{% session foo = bar %}\n{{ context.session | json }} =\u003e { \\\"foo\\\": \\\"42\\\" }","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% session foo = null %}\n{{ context.session | json }} =\u003e {}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% session foo = blank %}\n{{ context.session | json }} =\u003e {}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Sign in user","syntax":"{% sign_in user_id: '12345' %}","name":"sign_in","parameters":[{"description":"id of the user you want to sign in","name":"user_id","required":false,"types":["untyped"]},{"description":"number of minutes after user will be log out","name":"timeout_in_minutes","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% sign_in user_id: '12345' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% sign_in user_id: '12345', timeout_in_minutes: 15 %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Generates html for spam protection. Supports Google reCAPTCHA strategies: recaptcha_v2, recaptcha_v3 and hcaptcha","syntax":"{% form %}\n {% spam_protection \\\"recaptcha_v2\\\" %}\n{% endform %}","name":"spam_protection","parameters":[{"description":"name of protection strategy. Default is recaptcha_v2","name":"strategy","required":false,"types":["untyped"]},{"description":"action name for reCAPTCHA V3, action may only contain alphanumeric characters and slashes","name":"action","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {% spam_protection \\\"recaptcha_v2\\\" %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {% spam_protection \\\"recaptcha_v3\\\", action: \\\"signup\\\" %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {% spam_protection \\\"hcaptcha\\\" %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"html","deprecated":false,"deprecation_reason":"","description":"\u003e Note:\n\u003e If you reference [color settings](/themes/architecture/settings/input-settings#color) inside `style` tags, then\n\u003e the associated CSS rules will update as the setting is changed in the theme editor, without a page refresh.","parameters":[],"summary":"Generates an HTML `\u003cstyle\u003e` tag with an attribute of `data-shopify`.","name":"style","syntax":"{% style %}\n CSS_rules\n{% endstyle %}","syntax_keywords":[{"keyword":"CSS_rules","description":"The desired CSS rules for the `\u003cstyle\u003e` tag."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% style %}\n .h1 {\n color: {{ settings.colors_accent_1 }};\n }\n{% endstyle %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"The `tablerow` tag must be wrapped in HTML `\u003ctable\u003e` and `\u003c/table\u003e` tags.\n\n\u003e Tip:\n\u003e Every `tablerow` loop has an associated [`tablerowloop` object](/docs/api/liquid/objects/tablerowloop) with information about the loop.","parameters":[{"description":"The number of columns that the table should have.","name":"cols","required":false,"types":["number"]},{"description":"The number of iterations to perform.","name":"limit","required":false,"types":["number"]},{"description":"The 1-based index to start iterating at.","name":"offset","required":false,"types":["number"]},{"description":"A custom numeric range to iterate over.","name":"range","required":false,"types":["untyped"]}],"summary":"Generates HTML table rows for every item in an array.","name":"tablerow","syntax":"{% tablerow variable in array %}\n expression\n{% endtablerow %}","syntax_keywords":[{"keyword":"variable","description":"The current item in the array."},{"keyword":"array","description":"The array to iterate over."},{"keyword":"expression","description":"The expression to render."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":false,"display_type":"text","show_data_tab":true},{"name":"cols","description":"You can define how many columns the table should have using the `cols` parameter.","syntax":"{% tablerow variable in array cols: number %}\n expression\n{% endtablerow %}\n","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products cols: 2 %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true},{"name":"limit","description":"You can limit the number of iterations using the `limit` parameter.","syntax":"{% tablerow variable in array limit: number %}\n expression\n{% endtablerow %}\n","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products limit: 2 %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true},{"name":"offset","description":"You can specify a 1-based index to start iterating at using the `offset` parameter.","syntax":"{% tablerow variable in array offset: number %}\n expression\n{% endtablerow %}\n","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products offset: 2 %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true},{"name":"range","description":"Instead of iterating over specific items in an array, you can specify a numeric range to iterate over.\n\n\u003e Note:\n\u003e You can define the range using both literal and variable values.\n","syntax":"{% tablerow variable in (number..number) %}\n expression\n{% endtablerow %}\n","path":"/","raw_liquid":"\u003ctable\u003e\n {% tablerow i in (1..3) %}\n {{ i }}\n {% endtablerow %}\n\u003c/table\u003e\n\n{%- assign lower_limit = 2 -%}\n{%- assign upper_limit = 4 -%}\n\n\u003ctable\u003e\n {% tablerow i in (lower_limit..upper_limit) %}\n {{ i }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to specify search paths for theme partials via app/config.yml property \"theme_render_paths\"\n\nAssuming app/config.yml looks like this:\n\ntheme_search_paths :\n- theme/{{ context.constants.MY_THEME | default: \"custom\" }}\n- theme/simple","syntax":"\nWhen you render a partial using theme_render\n\n{% theme_render_rc 'product' %}\n\nThe system will try to render theme/custom/product, and if it does not exist, it will fallback to theme/simple/product (if it also does not exist, the missing partial error is raised)","name":"theme_render_rc","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"\nWhen you render a partial using theme_render\n\n{% theme_render_rc 'product' %}\n\nThe system will try to render theme/custom/product, and if it does not exist, it will fallback to theme/simple/product (if it also does not exist, the missing partial error is raised)","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to catch errors, especially useful with `liquid_raise_mode: true` setting in app/config.yml.","syntax":"{% liquid\n try\n include template_path\n catch err\n unless err.message contains \\\"can't find partial\\\"\n log err, type: 'error when including template file'\n endunless\n include fallback_template_path\n endtry\n%}","name":"try","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n try\n include template_path\n catch err\n unless err.message contains \\\"can't find partial\\\"\n log err, type: 'error when including template file'\n endunless\n include fallback_template_path\n endtry\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"\u003e Tip:\n\u003e Similar to the [`if` tag](/docs/api/liquid/tags/if), you can use `elsif` to add more conditions to an `unless` tag.","parameters":[],"summary":"Renders an expression unless a specific condition is `true`.","name":"unless","syntax":"{% unless condition %}\n expression\n{% endunless %}","syntax_keywords":[{"keyword":"condition","description":"The condition to evaluate."},{"keyword":"expression","description":"The expression to render unless the condition is met."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% unless product.has_only_default_variant %}\n // Variant selection functionality\n{% endunless %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Execute code wrapped inside content_for","syntax":"Use this in a liquid view first. Then you can use yield inside the layout (for example) or another subsequently rendered view, like below:\n{% content_for 'greeting' %}Hello world{% endcontent_for %}\n\n# another_file.liquid\n{% yield 'greeting' %}","name":"yield","parameters":[{"description":"name of content_for block","name":"name","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"Use this in a liquid view first. Then you can use yield inside the layout (for example) or another subsequently rendered view, like below:\n{% content_for 'greeting' %}Hello world{% endcontent_for %}\n\n# another_file.liquid\n{% yield 'greeting' %}","parameter":false,"display_type":"text","show_data_tab":true}]}]
4
+ [{"category":"variable","deprecated":false,"deprecation_reason":"","description":"You can create variables of any [basic type](/docs/api/liquid/basics#types), [object](/docs/api/liquid/objects), or object property.","parameters":[],"summary":"Creates a new variable.","name":"assign","syntax":"{% assign variable_name = value %}","syntax_keywords":[{"keyword":"variable_name","description":"The name of the variable being created."},{"keyword":"value","description":"The value you want to assign to the variable."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{%- assign product_title = product.title | upcase -%}\n\n{{ product_title }}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Invokes code within the tag asynchronously, in the background.\nYou will only have access to variables you explicitly pass to the background tag. The context object is available by default, but with limitations - you need\nto explicitly pass page/layout metadata if you want to use it, as well as device and constants.","syntax":"Run background code from partial\nThe following code will run all the log queries in the background, not earlier than 0.5 minute (30 seconds) since the execution. You will only have access to variables\nexplicitly provided to the background tag: \"data\" and \"hey\". Note that you will not have access to the \"my_data\" variable. Also note\nthat the result of this background tag will not be rendered, and you will not have access to any variable inside the background tag.\n\n# app/views/partials/example_partial.liquid\n{% liquid\n log not_available_in_background # Will be null, as this variable was not passed to the background tag\n log data # You will see { \"hello\": \"world\" }, as it was provided to the background tag\n log hey # You will see \"hello\" as it was provided to the background tag\n log context # You will copy the current request context and make it available in the background\n assign not_available_outside = \"You will not see me\"\n\n%}\n\n# app/views/pages/test.liquid\n{% liquid\n assign my_data = null | hash_merge: hello: \"world\"\n assign not_available_in_job = \"You will not see me \"\n background job_id = 'example_partial', delay: 0.1, max_attempts: 3, source_name: 'custom_job', data: my_data, hey: 'hello'\n\n # This variable will be rendered in the background, meaning you won't see anything on the page\n echo not_available_outside\n%}","name":"background","parameters":[{"description":"Any variable provided to the background tag will become accessible in the code.","name":"options","required":false,"types":["untyped"]},{"description":"which defines the number of minutes to delay running code (defaults to 0, which means run code as soon as possible)","name":"options.delay","required":false,"types":["untyped"]},{"description":"low, default or high - see AsyncCallbackPriorityEnum GraphQL Object","name":"options.priority","required":false,"types":["untyped"]},{"description":"the number of time to re-try job upon failing. Default is 1, maximum is 5","name":"options.max_attempts","required":false,"types":["untyped"]},{"description":"your label of the job, which would help you identify it","name":"options.source_name","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"Run background code from partial\nThe following code will run all the log queries in the background, not earlier than 0.5 minute (30 seconds) since the execution. You will only have access to variables\nexplicitly provided to the background tag: \"data\" and \"hey\". Note that you will not have access to the \"my_data\" variable. Also note\nthat the result of this background tag will not be rendered, and you will not have access to any variable inside the background tag.\n\n# app/views/partials/example_partial.liquid\n{% liquid\n log not_available_in_background # Will be null, as this variable was not passed to the background tag\n log data # You will see { \"hello\": \"world\" }, as it was provided to the background tag\n log hey # You will see \"hello\" as it was provided to the background tag\n log context # You will copy the current request context and make it available in the background\n assign not_available_outside = \"You will not see me\"\n\n%}\n\n# app/views/pages/test.liquid\n{% liquid\n assign my_data = null | hash_merge: hello: \"world\"\n assign not_available_in_job = \"You will not see me \"\n background job_id = 'example_partial', delay: 0.1, max_attempts: 3, source_name: 'custom_job', data: my_data, hey: 'hello'\n\n # This variable will be rendered in the background, meaning you won't see anything on the page\n echo not_available_outside\n%}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Deprecated\nThe following code will run all the log queries in the background, not earlier than 0.5 minute (30 seconds) since the execution. You will only have access to variables\nexplicitly provided to the background tag: \"data\" and \"hey\". Note that you will not have access to the \"my_data\" variable. Also note\nthat the result of this background tag will not be rendered, and you will not have access to any variable inside the background tag.\n\n{% parse_json my_data %}{ \"hello\": \"world\" }{% endparse_json %}\n{% assign not_available_in_background = \"You will not see me\" %}\n{% background priority: 'low', delay: 0.5, max_attempts: 3, source_name: \"my custom job\", data: my_data, hey: 'hello' %}\n {% log not_available_in_background %} {% comment %}Will be null, as this variable was not passed to the background tag {% endcomment %}\n {% log data %} {% comment %}You will see { \"hello\": \"world\" }, as it was provided to the background tag{% endcomment %}\n {% log hey %} {% comment %}You will see \"hello\" as it was provided to the background tag{% endcomment %}\n {% log context %} {% comment %}You will copy the current request context and make it available in the background{% endcomment %}\n {% assign not_available_outside = \"You will not see me\" %}\n {{ not_available_outside }} {% comment %}This variable will be rendered in the background, meaning you won't see anything on the page{% endcomment %}\n{% endbackground %}\n{{ not_available_outside }} {% comment %}This will be blank, because the assign will happen in the background - you won't have access to it here{% endcomment %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Stops a [`for` loop](/docs/api/liquid/tags/for) from iterating.","name":"break","syntax":"{% break %}","syntax_keywords":[],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..5) -%}\n {%- if i == 4 -%}\n {% break %}\n {%- else -%}\n {{ i }}\n {%- endif -%}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Checks if there's string cached for the given key. If yes, it just returns the value without processing\nanything inside the cache tag, otherwise it executes code, stores the result in the cache.\nWhen you hit the page with such code for the first time, the code will be executed and hence it will iterate through the loop\nand generate random strings. However, then the result of the block will be cached and all the following requests within 20 seconds\nwould not invoke the code - instead, it would just take the value from the cache. The output will not change. When the cache expires,\nthe code will be evaluated again, producing another set of random string.\nCache is automatically invalidated if any changes are applied to any view/translation.","syntax":"{% cache 'this is my key', expire: 20 %}\n \u003cul\u003e\n {% for i in (1..100) %}\n \u003cli\u003e{{ 18 | random_string }}\u003c/li\u003e\n {% endfor %}\n \u003c/ul\u003e\n{% endcache %}","name":"cache","parameters":[{"description":"the key which should uniquely identify the cached fragment","name":"key","required":false,"types":["untyped"]},{"description":"optional. number of seconds since populating the cache to expiration","name":"expire","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% cache 'this is my key', expire: 20 %}\n \u003cul\u003e\n {% for i in (1..100) %}\n \u003cli\u003e{{ 18 | random_string }}\u003c/li\u003e\n {% endfor %}\n \u003c/ul\u003e\n{% endcache %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json pagesUpdatedAt %}\n {%- cache pagesUpdatedAtCache -%}\n {%- graphql g = 'pages_updated_at' | dig: 'admin_pages', 'results' -%}\n {{- g -}}\n {%- endcache -%}\n{% endparse_json %}\n{%- export pagesUpdatedAt, namespace: 'nav' -%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"variable","deprecated":false,"deprecation_reason":"","description":"You can create complex strings with Liquid logic and variables.","parameters":[],"summary":"Creates a new variable with a string value.","name":"capture","syntax":"{% capture variable %}\n value\n{% endcapture %}","syntax_keywords":[{"keyword":"variable","description":"The name of the variable being created."},{"keyword":"value","description":"The value you want to assign to the variable."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{%- assign up_title = product.title | upcase -%}\n{%- assign down_title = product.title | downcase -%}\n{%- assign show_up_title = true -%}\n\n{%- capture title -%}\n {% if show_up_title -%}\n Upcase title: {{ up_title }}\n {%- else -%}\n Downcase title: {{ down_title }}\n {%- endif %}\n{%- endcapture %}\n\n{{ title }}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Renders a specific expression depending on the value of a specific variable.","name":"case","syntax":"{% case variable %}\n {% when first_value %}\n first_expression\n {% when second_value %}\n second_expression\n {% else %}\n third_expression\n{% endcase %}","syntax_keywords":[{"keyword":"variable","description":"The name of the variable you want to base your case statement on."},{"keyword":"first_value","description":"A specific value to check for."},{"keyword":"second_value","description":"A specific value to check for."},{"keyword":"first_expression","description":"An expression to be rendered when the variable's value matches `first_value`."},{"keyword":"second_expression","description":"An expression to be rendered when the variable's value matches `second_value`."},{"keyword":"third_expression","description":"An expression to be rendered when the variable's value has no match."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% case product.type %}\n {% when 'Health' %}\n This is a health potion.\n {% when 'Love' %}\n This is a love potion.\n {% else %}\n This is a potion.\n{% endcase %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Multiple values","description":"A `when` tag can accept multiple values. When multiple values are provided, the expression is returned when the variable matches any of the values inside of the tag.\nProvide the values as a comma-separated list, or separate them using an `or` operator.\n","syntax":"{% case variable %}\n {% when first_value or second_value or third_value %}\n first_expression\n {% when fourth_value, fifth_value, sixth_value %}\n second_expression\n {% else %}\n third_expression\n{% endcase %}\n","path":"/products/health-potion","raw_liquid":"{% case product.tags %}\n {% when 'Love' or 'Luck' %}\n This is a love or luck potion.\n {% when 'Strength','Health' %}\n This is a strength or health potion.\n {% else %}\n This is a potion.\n{% endcase %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"Any text inside `comment` tags won't be output, and any Liquid code will be parsed, but not executed.","parameters":[],"summary":"Prevents an expression from being rendered or output.","name":"comment","syntax":"{% comment %}\n content\n{% endcomment %}","syntax_keywords":[{"keyword":"content","description":"The content of the comment."}],"examples":[{"name":"Inline comments","description":"Inline comments prevent an expression inside of a tag `{% %}` from being rendered or output.\n\nYou can use inline comment tags to annotate your code, or to temporarily prevent logic in your code from executing.\n\nYou can create multi-line inline comments. However, each line in the tag must begin with a `#`, or a syntax error will occur.\n","syntax":"{% # content %}","path":"/","raw_liquid":"{% # this is a comment %}\n\n{% # for i in (1..3) -%}\n {{ i }}\n{% # endfor %}\n\n{%\n ###############################\n # This is a comment\n # across multiple lines\n ###############################\n%}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Inline comments inside `liquid` tags","description":"You can use inline comment tags inside [`liquid` tags](/docs/api/liquid/tags/liquid). The tag must be used for each line that you want to comment.\n","syntax":"","path":"/","raw_liquid":"{% liquid\n # this is a comment\n assign topic = 'Learning about comments!'\n echo topic\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Stores a block of markup in an identifier for later use.\nRender it later with `yield` tag.","syntax":"{% content_for 'header' %}\n Hello world\n{% endcontent_for %}","name":"content_for","parameters":[{"description":"the markups will be stored under this name","name":"name","required":false,"types":["untyped"]},{"description":"optional. If the flush parameter is true content_for replaces the blocks it is given instead of appending content to the existing one","name":"flush","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% content_for 'header' %}\n Hello world\n{% endcontent_for %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Set locale in context to given language","syntax":"{% context language: 'de' %}","name":"context","parameters":[{"description":"language 2 letter","name":"language","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% context language: 'de' %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Causes a [`for` loop](/docs/api/liquid/tags/for) to skip to the next iteration.","name":"continue","syntax":"{% continue %}","syntax_keywords":[],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..5) -%}\n {%- if i == 4 -%}\n {% continue %}\n {%- else -%}\n {{ i }}\n {%- endif -%}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"The `cycle` tag must be used inside a `for` loop.\n\n\u003e Tip:\n\u003e Use the `cycle` tag to output text in a predictable pattern. For example, to apply odd/even classes to rows in a table.","parameters":[],"summary":"Loops through a group of strings and outputs them one at a time for each iteration of a [`for` loop](/docs/api/liquid/tags/for).","name":"cycle","syntax":"{% cycle string, string, ... %}","syntax_keywords":[],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..4) -%}\n {% cycle 'one', 'two', 'three' %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Create unique cycle groups","description":"If you include multiple `cycle` tags with the same parameters, in the same template, then each set of tags is treated as the same group. This means that it's possible for a `cycle` tag to output any of the provided strings, instead of always starting at the first string.\nTo account for this, you can specify a group name for each `cycle` tag.\n","syntax":"{% cycle string: string, string, ... %}","path":"/","raw_liquid":"\u003c!-- Iteration 1 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'one', 'two', 'three' %}\n{%- endfor %}\n\n\u003c!-- Iteration 2 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'one', 'two', 'three' %}\n{%- endfor %}\n\n\u003c!-- Iteration 3 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'group_1': 'one', 'two', 'three' %}\n{%- endfor %}\n\n\u003c!-- Iteration 4 --\u003e\n{% for i in (1..4) -%}\n {% cycle 'group_2': 'one', 'two', 'three' %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"variable","deprecated":false,"deprecation_reason":"","description":"Variables that are declared with `decrement` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[snippets](/themes/architecture#snippets) included in the file.\n\nSimilarly, variables that are created with `decrement` are independent from those created with [`assign`](/docs/api/liquid/tags/assign)\nand [`capture`](/docs/api/liquid/tags/capture). However, `decrement` and [`increment`](/docs/api/liquid/tags/increment) share\nvariables.","parameters":[],"summary":"Creates a new variable, with a default value of -1, that's decreased by 1 with each subsequent call.","name":"decrement","syntax":"{% decrement variable_name %}","syntax_keywords":[{"keyword":"variable_name","description":"The name of the variable being decremented."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% decrement variable %}\n{% decrement variable %}\n{% decrement variable %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"Using the `echo` tag is the same as wrapping an expression in curly brackets (`{{` and `}}`). However, unlike the curly\nbracket method, you can use the `echo` tag inside [`liquid` tags](/docs/api/liquid/tags/liquid).\n\n\u003e Tip:\n\u003e You can use [filters](/docs/api/liquid/filters) on expressions inside `echo` tags.","parameters":[],"summary":"Outputs an expression.","name":"echo","syntax":"{% liquid\n echo expression\n%}","syntax_keywords":[{"keyword":"expression","description":"The expression to be output."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% echo product.title %}\n\n{% liquid\n echo product.price | money\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Allows you to specify a default expression to execute when a [`for` loop](/docs/api/liquid/tags/for) has zero length.","name":"else","syntax":"{% for variable in array %}\n first_expression\n{% else %}\n second_expression\n{% endfor %}","syntax_keywords":[{"keyword":"variable","description":"The current item in the array."},{"keyword":"array","description":"The array to iterate over."},{"keyword":"first_expression","description":"The expression to render for each iteration."},{"keyword":"second_expression","description":"The expression to render if the loop has zero length."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/empty","raw_liquid":"{% for product in collection.products %}\n {{ product.title }}\u003cbr\u003e\n{% else %}\n There are no products in this collection.\n{% endfor %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"You can use the `else` tag with the following tags:\n\n- [`case`](/docs/api/liquid/tags/case)\n- [`if`](/docs/api/liquid/tags/if)\n- [`unless`](/docs/api/liquid/tags/unless)","parameters":[],"summary":"Allows you to specify a default expression to execute when no other condition is met.","name":"else","syntax":"{% else %}\n expression","syntax_keywords":[{"keyword":"expression","description":"The expression to render if no other condition is met."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% if product.available %}\n This product is available!\n{% else %}\n This product is sold out!\n{% endif %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Makes variables defined inside partial accessible anywhere via context.exports.`namespace`","syntax":"{% liquid\n assign a = 'value for a'\n assign b = 'value for b'\n export a, b, namespace: 'my_hash'\n%}\n\n{{ context.exports.my_hash }} =\u003e { \"a\": \"value for a\", \"b\": \"value for b\" }\n{% parse_json company %}\n{\n \"name\": \"platformOS\",\n \"technologies\": [\"liquid\", \"graphql\"],\n \"countries\": { \"USA\": 5, \"Poland\": 5, \"Romania\": 2 }\n}\n{% endparse_json %}\n\n{% export company, namespace: 'data' %}\n\n{{ context.exports.data }} =\u003e\n {\"company\"=\u003e{\"name\"=\u003e\"platformOS\", \"technologies\"=\u003e[\"liquid\", \"graphql\"], \"countries\"=\u003e{\"USA\"=\u003e5, \"Poland\"=\u003e5, \"Romania\"=\u003e2}}}\n{{ context.exports.data.company.technologies }} =\u003e liquidgraphql\n{{ context.exports.data.company.name }} =\u003e platformOS","name":"export","parameters":[{"description":"variable to be stored inside the namespace","name":"variable","required":false,"types":["untyped"]},{"description":"namespace under which variable will be in context.exports","name":"namespace","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n assign a = 'value for a'\n assign b = 'value for b'\n export a, b, namespace: 'my_hash'\n%}\n\n{{ context.exports.my_hash }} =\u003e { \"a\": \"value for a\", \"b\": \"value for b\" }\n{% parse_json company %}\n{\n \"name\": \"platformOS\",\n \"technologies\": [\"liquid\", \"graphql\"],\n \"countries\": { \"USA\": 5, \"Poland\": 5, \"Romania\": 2 }\n}\n{% endparse_json %}\n\n{% export company, namespace: 'data' %}\n\n{{ context.exports.data }} =\u003e\n {\"company\"=\u003e{\"name\"=\u003e\"platformOS\", \"technologies\"=\u003e[\"liquid\", \"graphql\"], \"countries\"=\u003e{\"USA\"=\u003e5, \"Poland\"=\u003e5, \"Romania\"=\u003e2}}}\n{{ context.exports.data.company.technologies }} =\u003e liquidgraphql\n{{ context.exports.data.company.name }} =\u003e platformOS","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"You can do a maximum of 50 iterations with a `for` loop. If you need to iterate over more than 50 items, then use the\n[`paginate` tag](/docs/api/liquid/tags/paginate) to split the items over multiple pages.\n\n\u003e Tip:\n\u003e Every `for` loop has an associated [`forloop` object](/docs/api/liquid/objects/forloop) with information about the loop.","parameters":[{"description":"The number of iterations to perform.","name":"limit","required":false,"types":["number"]},{"description":"The 1-based index to start iterating at.","name":"offset","required":false,"types":["number"]},{"description":"A custom numeric range to iterate over.","name":"range","required":false,"types":["untyped"]},{"description":"Iterate in reverse order.","name":"reversed","required":false,"types":["untyped"]}],"summary":"Renders an expression for every item in an array.","name":"for","syntax":"{% for variable in array %}\n expression\n{% endfor %}","syntax_keywords":[{"keyword":"variable","description":"The current item in the array."},{"keyword":"array","description":"The array to iterate over."},{"keyword":"expression","description":"The expression to render for each iteration."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products -%}\n {{ product.title }}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"limit","description":"You can limit the number of iterations using the `limit` parameter.","syntax":"{% for variable in array limit: number %}\n expression\n{% endfor %}\n","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products limit: 2 -%}\n {{ product.title }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"offset","description":"You can specify a 1-based index to start iterating at using the `offset` parameter.","syntax":"{% for variable in array offset: number %}\n expression\n{% endfor %}\n","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products offset: 2 -%}\n {{ product.title }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"range","description":"Instead of iterating over specific items in an array, you can specify a numeric range to iterate over.\n\n\u003e Note:\n\u003e You can define the range using both literal and variable values.\n","syntax":"{% for variable in (number..number) %}\n expression\n{% endfor %}\n","path":"/collections/all","raw_liquid":"{% for i in (1..3) -%}\n {{ i }}\n{%- endfor %}\n\n{%- assign lower_limit = 2 -%}\n{%- assign upper_limit = 4 -%}\n\n{% for i in (lower_limit..upper_limit) -%}\n {{ i }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"reversed","description":"You can iterate in reverse order using the `reversed` parameter.","syntax":"{% for variable in array reversed %}\n expression\n{% endfor %}\n","path":"/collections/sale-potions","raw_liquid":"{% for product in collection.products reversed -%}\n {{ product.title }}\n{%- endfor %}","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Used to generate a html form element for a resource. Use within `form configuration`.\nInside the tag you can use `form_builder` variable.","syntax":"{% form %}\n {{ form_builder }}\n{% endform %}","name":"form","parameters":[{"description":"set id attribute in `\u003cform id=\"\"\u003e` element","name":"html-id","required":false,"types":["untyped"]},{"description":"add `novalidate` attribute to `\u003cform novalidate\u003e` element","name":"html-novalidate","required":false,"types":["untyped"]},{"description":"add css class `\u003cform class=\"\"\u003e` element","name":"html-class","required":false,"types":["untyped"]},{"description":"add `enctype=\"multipart/form-data\"` attribute to `\u003cform enctype=\"multipart/form-data\"\u003e` element.\nMultipart is enabled by default","name":"html-multipart","required":false,"types":["untyped"]},{"description":"[String] add data attribute to `\u003cform data-[attr]=\"\"\u003e` element","name":"html-data-","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {{ form_builder }}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form html-id: 'someid', html-novalidate: true, html-class: 'big-form green-form', html-data-user-id: '12345', html-multipart: false %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to store a variable returned by a partial. Partial needs to return data with `return` tag.\nAll variables needs to be passed explicitly to function. Variables from upper scope are not visible in function.\n*Note:* `context` is not available inside the function partial unless explicitly passed as a variable.","syntax":"{% function res = 'path/to/my/partial', arg1: 'hello' %}","name":"function","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% function res = 'path/to/my/partial', arg1: 'hello' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"# path/to/my/partial\n{% liquid\n assign res = 'hello' | append: foo | append: ' ' | append: context.location.host\n return res\n%}\n# path/to/my/partial\n\n{% liquid\n assign foo = 'hello'\n function res = 'path/to/my/partial', foo: foo, context: context\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Used to execute GraphQL query stored in a file or invoke GraphQL query inline. All arguments provided to the tag will be passed to GraphQL.\nIt returns a hash with the data or the errors that occurred (for example, variable type mismatch, required variable not provided,\nsyntax error) etc.","syntax":"Invoke query \"get_models\" and store the result in variable \"g\":\n{% graphql g = \"get_models\", model_id: context.params.slug2 %}","name":"graphql","parameters":[{"description":"name of the GraphQL query. For get_users.graphql file name of the query is get_users","name":"query_name","required":false,"types":["untyped"]},{"description":"optional. key:value pair(s) which will be passed to GraphQL query. For example, if\nyour query looks like `query my_query($email: String!)`, then you can provide `email: \"my-email@example.com\"`","name":"arguments","required":false,"types":["untyped"]},{"description":"optional. Either a Hash or a String) of the arguments which will be passed to GraphQL query. See examples below.","name":"args","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"Invoke query \"get_models\" and store the result in variable \"g\":\n{% graphql g = \"get_models\", model_id: context.params.slug2 %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Chain filters to extract results in one line:\n{% graphql g = \"get_models\", model_id: context.params.slug2 | fetch: 'models' | fetch: 'results' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Pass all arguments at once as a hash to have graphql tag in one line and/or compose arguments hash dynamically:\n{% parse_json arguments %}\n {\n \"model_id\": {{ context.params.slug2 | json }},\n \"user_id\": {{ context.params.user_id | json }}\n }\n{% endparse_json %}\n\n{% graphql g = \"get_models\", args: arguments %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Pass all arguments at once as a JSON string:\n\n{% capture arguments %}\n{\n \"per_page\": 20,\n \"page\": 2\n}\n{% endcapture %}\n\n{% graphql g = \"get_models\", args: arguments %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"Invoke inline query and store the result in variable \"g\". This is recommended for one-time used queries.\n\n{% graphql g, id: context.params.slug2, message: \"new message\" %}\n mutation set_message($id: ID!, $message: String!) {\n model_update(\n id: $id\n model: {\n properties: [{ name: \"message\", value: $message }]\n }\n ) {\n id\n message: property(name: \"message\")\n }\n }\n{% endgraphql %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to easily modify a Hash with a syntax same as assign tag.","syntax":"{% parse_json my_hash %}{ \"a\": { \"b\": { \"c\": \"12\", \"d\": \"hello\" } } }{% endparse_json %}\n{% hash_assign my_hash[\"a\"][\"e\"] = \"assign\" | upcase %}\n{{ my_hash }} =\u003e {\"a\":{\"b\":{\"c\":\"12\",\"d\":\"hello\"},\"e\":\"ASSIGN\"}}","name":"hash_assign","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \"a\": { \"b\": { \"c\": \"12\", \"d\": \"hello\" } } }{% endparse_json %}\n{% hash_assign my_hash[\"a\"][\"e\"] = \"assign\" | upcase %}\n{{ my_hash }} =\u003e {\"a\":{\"b\":{\"c\":\"12\",\"d\":\"hello\"},\"e\":\"ASSIGN\"}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \"a\": { \"b\": { \"c\": \"12\", \"d\": \"hello\" } } }{% endparse_json %}\n{% hash_assign my_hash[\"a\"][\"b\"][\"d\"] = \"bye\" | upcase %}\n{{ my_hash }} =\u003e {\"a\":{\"b\":{\"c\":\"12\",\"d\":\"BYE\"}}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \"a\": { \"b\": { \"c\": \"12\", \"d\": \"hello\" } } }{% endparse_json %}\n{% hash_assign my_hash[\"a\"][\"b\"] = null %}\n{{ my_hash }} =\u003e {\"a\":{\"b\":null}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json my_hash %}{ \"a\": { \"b\": { \"c\": \"12\", \"d\": \"hello\" } } }{% endparse_json %}\n{% hash_assign my_hash[\"a\"][\"b\"][\"c\"][\"e\"] = \"bye\" | upcase %}) =\u003e HashAssignTagError: Liquid error: my_hash[a][b][c] is 12, expected Hash","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Renders an expression if a specific condition is `true`.","name":"if","syntax":"{% if condition %}\n expression\n{% endif %}","syntax_keywords":[{"keyword":"condition","description":"The condition to evaluate."},{"keyword":"expression","description":"The expression to render if the condition is met."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/glacier-ice","raw_liquid":"{% if product.compare_at_price \u003e product.price %}\n This product is on sale!\n{% endif %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"elsif","description":"You can use the `elsif` tag to check for multiple conditions.","syntax":"","path":"/products/health-potion","raw_liquid":"{% if product.type == 'Love' %}\n This is a love potion!\n{% elsif product.type == 'Health' %}\n This is a health potion!\n{% endif %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"theme","deprecated":true,"deprecation_reason":"Deprecated because the way that variables are handled reduces performance and makes code harder to both read and maintain.\n\nThe `include` tag has been replaced by [`render`](/docs/api/liquid/tags/render).","description":"Inside the snippet, you can access and alter variables that are [created](/docs/api/liquid/tags/variable-tags) outside of the\nsnippet.","parameters":[],"summary":"Renders a [snippet](/themes/architecture#snippets).","name":"include","syntax":"{% include 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the snippet to render, without the `.liquid` extension."}],"examples":[]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"This tag should be used to render forms defined in forms directory","syntax":"{% include_form 'signup_form' %}","name":"include_form","parameters":[{"description":"name of the form configuration from forms directory","name":"form_name","required":false,"types":["untyped"]},{"description":"id of the resource you want to edit","name":"id","required":false,"types":["untyped"]},{"description":"name of the resource type, f.e. name of custom_model_type, transactable_type, user_profile_type","name":"parent_resource_id","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% include_form 'signup_form' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% include_form 'edit_user', id: user.id %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% include_form 'manager_invite_to_interview', parent_resource_id: 'invitation', user: g.user %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"variable","deprecated":false,"deprecation_reason":"","description":"Variables that are declared with `increment` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[snippets](/themes/architecture#snippets) included in the file.\n\nSimilarly, variables that are created with `increment` are independent from those created with [`assign`](/docs/api/liquid/tags/assign)\nand [`capture`](/docs/api/liquid/tags/capture). However, `increment` and [`decrement`](/docs/api/liquid/tags/decrement) share\nvariables.","parameters":[],"summary":"Creates a new variable, with a default value of 0, that's increased by 1 with each subsequent call.","name":"increment","syntax":"{% increment variable_name %}","syntax_keywords":[{"keyword":"variable_name","description":"The name of the variable being incremented."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% increment variable %}\n{% increment variable %}\n{% increment variable %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"Because the tags don't have delimeters, each tag needs to be on its own line.\n\n\u003e Tip:\n\u003e Use the [`echo` tag](/docs/api/liquid/tags/echo) to output an expression inside `liquid` tags.","parameters":[],"summary":"Allows you to have a block of Liquid without delimeters on each tag.","name":"liquid","syntax":"{% liquid\n expression\n%}","syntax_keywords":[{"keyword":"expression","description":"The expression to be rendered inside the `liquid` tag."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% liquid\n # Show a message that's customized to the product type\n\n assign product_type = product.type | downcase\n assign message = ''\n\n case product_type\n when 'health'\n assign message = 'This is a health potion!'\n when 'love'\n assign message = 'This is a love potion!'\n else\n assign message = 'This is a potion!'\n endcase\n\n echo message\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Print information to environment logs. To view logs run `pos-cli gui serve \u003cenvironment\u003e` in your application directory and go to `http://localhost:3333/Logs`. If you prefer seeing logs in the terminal, run `pos-cli gui logs \u003cenvironment\u003e`","syntax":"{% log 'hello world' %}","name":"log","parameters":[{"description":"Any object that can be printed","name":"message","required":false,"types":["untyped"]},{"description":"type of log entry. Use it to tag your logs to make it easier to differentiate logs. If you set it to 'error' pos-cli will also notify your OS about it if your OS supports it.","name":"type","required":false,"types":["untyped"]},{"description":"environment where the entry should be created; can be any of 'all', 'staging', 'production'. Default: 'all'","name":"env","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log 'hello world' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log params, type: 'request-params' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log user.id, type: 'debug' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log context.current_user, type: 'error' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% log context.current_user, type: 'error', env: 'staging' %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"Because [`for` loops](/docs/api/liquid/tags/for) are limited to 50 iterations per page, you need to use the `paginate` tag to\niterate over an array that has more than 50 items. The following arrays can be paginated:\n\n- [`all_products`](/docs/api/liquid/objects/all_products)\n- [`article.comments`](/docs/api/liquid/objects/article#article-comments)\n- [`blog.articles`](/docs/api/liquid/objects/blog#blog-articles)\n- [`collections`](/docs/api/liquid/objects/collections)\n- [`collection.products`](/docs/api/liquid/objects/collection#collection-products)\n- [`customer.addresses`](/docs/api/liquid/objects/customer#customer-addresses)\n- [`customer.orders`](/docs/api/liquid/objects/customer#customer-orders)\n- [`pages`](/docs/api/liquid/objects/pages)\n- [`search.results`](/docs/api/liquid/objects/search#search-results)\n- [`collection_list` settings](/themes/architecture/settings/input-settings#collection_list)\n- [`product_list` settings](/themes/architecture/settings/input-settings#product_list)\n\nWithin the `paginate` tag, you have access to the [`paginate` object](/docs/api/liquid/objects/paginate). You can use this\nobject, or the [`default_pagination` filter](/docs/api/liquid/filters/default_pagination), to build page navigation.","parameters":[{"description":"The number of pages to display in the pagination.","name":"window_size","required":false,"types":["string"]}],"summary":"Splits an array's items across multiple pages.","name":"paginate","syntax":"{% paginate array by page_size %}\n {% for item in array %}\n forloop_content\n {% endfor %}\n{% endpaginate %}","syntax_keywords":[{"keyword":"array","description":"The array to be looped over."},{"keyword":"page_size","description":"The number of array items to include per page, between 1 and 50."},{"keyword":"item","description":"An item in the array being looped."},{"keyword":"forloop_content","description":"Content for each loop iteration."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/all","raw_liquid":"{% paginate collection.products by 5 %}\n {% for product in collection.products -%}\n {{ product.title }}\n {%- endfor %}\n\n {{- paginate | default_pagination }}\n{% endpaginate %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"Paginating setting arrays","description":"To allow the pagination of `product_list` and `collection_list` settings to operate independently from other paginated lists on a page, these lists use a pagination query parameter with a unique key. The key is automatically assigned by the `paginate` tag, and you don't need to reference the key in your code. However, you can access the key using [`paginate.page_param`](/docs/api/liquid/objects/paginate#paginate-page_param).\n\n\u003e Tip:\n\u003e To paginate two arrays independently without refreshing the entire page, you can use the [Section Rendering API](/api/section-rendering).\n","syntax":"","path":"/","raw_liquid":"","parameter":false,"display_type":"text","show_data_tab":true},{"name":"window_size","description":"Set the window size of the pagination. The window size is the number of pages that should be visible in the pagination navigation.\n","syntax":"{% paginate collection.products by 3, window_size: 1 %}","path":"/collections/all","raw_liquid":"{% paginate collection.products by 3, window_size: 1 %}\n {% for product in collection.products -%}\n {{ product.title }}\n {%- endfor %}\n\n {{- paginate | default_pagination }}\n{% endpaginate %}","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Captures and parses the JSON string inside of the opening and closing tags and assigns it to a variable.","syntax":"{% parse_json car %}\n { \"type\": \"SUV\", \"gearbox\": \"AT\" }\n{% endparse_json %}\n\n{{ car }} =\u003e {\"type\"=\u003e\"SUV\", \"gearbox\"=\u003e\"AT\"}\n{{ car.type }} =\u003e SUV","name":"parse_json","parameters":[{"description":"variable name that will be used to assign contents after it is parsed","name":"variable_name","required":false,"types":["untyped"]},{"description":"valid JSON string to be assigned","name":"content","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json car %}\n { \"type\": \"SUV\", \"gearbox\": \"AT\" }\n{% endparse_json %}\n\n{{ car }} =\u003e {\"type\"=\u003e\"SUV\", \"gearbox\"=\u003e\"AT\"}\n{{ car.type }} =\u003e SUV","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% parse_json cars %}\n [\n { \"maker\": \"Honda\", \"model\": \"CRX\" },\n { \"maker\": \"Subaru\", \"model\": \"Forester\"},\n { \"maker\": \"Lexus\", \"model\": \"LFA\" }\n ]\n{% endparse_json %}\n\n{{ cars }} =\u003e {\"maker\"=\u003e\"Honda\", \"model\"=\u003e\"CRX\"}{\"maker\"=\u003e\"Subaru\", \"model\"=\u003e\"Forester\"}{\"maker\"=\u003e\"Lexus\", \"model\"=\u003e\"LFA\"}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"In order to create JSON object from exsting values print them using `json` filter.\nThis is required only for strings and will escape properly `\"` and `'` characters.\nOther types will be handled automatically.\n\n{% parse_json nested %}\n {\n \"price\": 100\n }\n{% endparse_json %}\n{% assign color = \"red\" %}\n{% assign car = 'Mazda \"5\"' %}\n{% parse_json data %}\n {\n \"color\": {{ color | json }},\n \"car\": {{ car | json }},\n \"nested\": {{ nested }}\n }\n{% endparse_json %}\n\n{{ data }} =\u003e {\"color\":\"red\",\"car\":\"Mazda \\\"5\\\"\",\"nested\":{\"price\":100}}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Print variable, skipping any additional sanitization. It provides a way to display a variable which consists of both safe and unsafe html.\nWarning: Do not use it with data entered by users as it is gonna cause XSS.","syntax":"{% liquid\n assign invokable_script = \"\u003cscript\u003ealert('I will be executed')\u003c/script\u003e\"\n assign malicious_script = \"\u003cscript\u003ealert('I should be escaped')\u003c/script\u003e\"\n%}\n{% capture result %}\n {{ malicious_script }}{{ invokable_script | html_safe }}\n{% endcapture %}\n{% print result %}","name":"print","parameters":[{"description":"Variable containing safe and potentially unsafe HTML","name":"variable","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n assign invokable_script = \"\u003cscript\u003ealert('I will be executed')\u003c/script\u003e\"\n assign malicious_script = \"\u003cscript\u003ealert('I should be escaped')\u003c/script\u003e\"\n%}\n{% capture result %}\n {{ malicious_script }}{{ invokable_script | html_safe }}\n{% endcapture %}\n{% print result %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"syntax","deprecated":false,"deprecation_reason":"","description":"","parameters":[],"summary":"Outputs any Liquid code as text instead of rendering it.","name":"raw","syntax":"{% raw %}\n expression\n{ % endraw %}","syntax_keywords":[{"keyword":"expression","description":"The expression to be output without being rendered."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% raw %}\n{{ 2 | plus: 2 }} equals 4.\n{ % endraw %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Redirects browser to target","syntax":"{% redirect_to '/dashboard' %}","name":"redirect_to","parameters":[{"description":"path or url","name":"target","required":false,"types":["untyped"]},{"description":"3xx HTTP code, default 302","name":"status","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% redirect_to '/dashboard' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% redirect_to 'https://example.com/signup' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% redirect_to '/dashboard', status: 301 %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"theme","deprecated":false,"deprecation_reason":"","description":"Inside snippets and app blocks, you can't directly access variables that are [created](/docs/api/liquid/tags/variable-tags) outside\nof the snippet or app block. However, you can [specify variables as parameters](/docs/api/liquid/tags/render#render-passing-variables-to-a-snippet)\nto pass outside variables to snippets.\n\nWhile you can't directly access created variables, you can access global objects, as well as any objects that are\ndirectly accessible outside the snippet or app block. For example, a snippet or app block inside the [product template](/themes/architecture/templates/product)\ncan access the [`product` object](/docs/api/liquid/objects/product), and a snippet or app block inside a [section](/themes/architecture/sections)\ncan access the [`section` object](/docs/api/liquid/objects/section).\n\nOutside a snippet or app block, you can't access variables created inside the snippet or app block.\n\n\u003e Note:\n\u003e When you render a snippet using the `render` tag, you can't use the [`include` tag](/docs/api/liquid/tags/include)\n\u003e inside the snippet.","parameters":[],"summary":"Renders a [snippet](/themes/architecture#snippets) or [app block](/themes/architecture/sections/section-schema#render-app-blocks).","name":"render","syntax":"{% render 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the snippet to render, without the `.liquid` extension."}],"examples":[{"name":"for","description":"You can render a snippet for every item in an array using the `for` parameter. You can also supply an optional `as` parameter to be able to reference the current item in the iteration inside the snippet.\nAdditionally, you can access a [`forloop` object](/docs/api/liquid/objects/forloop) for the loop inside the snippet.\n","syntax":"{% render 'filename' for array as item %}","path":"/","raw_liquid":"","parameter":true,"display_type":"text","show_data_tab":true},{"name":"Passing variables to a snippet","description":"Variables that have been [created](/docs/api/liquid/tags/variable-tags) outside of a snippet can be passed to a snippet as parameters on the `render` tag.\n\n\u003e Note:\n\u003e Any changes that are made to a passed variable apply only within the snippet.\n","syntax":"{% render 'filename', variable: value %}","path":"/","raw_liquid":"","parameter":true,"display_type":"text","show_data_tab":true},{"name":"with","description":"You can pass a single object to a snippet using the `with` parameter. You can also supply an optional `as` parameter to specify a custom name to reference the object inside the snippet.\n","syntax":"{% render 'filename' with object as name %}","path":"/","raw_liquid":"","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows you to set additional HTTP headers for the response.","syntax":"{% response_headers '{\"foo\": \"bar\"}' %}","name":"response_headers","parameters":[{"description":"headers as JSON string, default {}","name":"headers","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_headers '{\"foo\": \"bar\"}' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_headers '{\"Content-Type\": \"application/json\", \"X-Frame-Options\": \"somevalue\" }' %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows you to set HTTP status for the response. Default 200.","syntax":"{% response_status 204 %}","name":"response_status","parameters":[{"description":"HTTP status, default 200","name":"status","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_status 204 %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% response_status 404 %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Used inside a partial invoked by a function tag to return a variable","syntax":"{% liquid\n assign result = 1 | plus: 3\n return result\n%}","name":"return","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n assign result = 1 | plus: 3\n return result\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Stores data during user's session\nSets field of given name to given value in context.session","syntax":"{% session foo = 'bar' %}\n{{ context.session | json }} =\u003e { \"foo\": \"bar\" }","name":"session","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% session foo = 'bar' %}\n{{ context.session | json }} =\u003e { \"foo\": \"bar\" }","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign bar = \"42\" }\n{% session foo = bar %}\n{{ context.session | json }} =\u003e { \"foo\": \"42\" }","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% session foo = null %}\n{{ context.session | json }} =\u003e {}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% session foo = blank %}\n{{ context.session | json }} =\u003e {}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Sign in user","syntax":"{% sign_in user_id: '12345' %}","name":"sign_in","parameters":[{"description":"id of the user you want to sign in","name":"user_id","required":false,"types":["untyped"]},{"description":"number of minutes after user will be log out","name":"timeout_in_minutes","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% sign_in user_id: '12345' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% sign_in user_id: '12345', timeout_in_minutes: 15 %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Generates html for spam protection. Supports Google reCAPTCHA strategies: recaptcha_v2, recaptcha_v3 and hcaptcha","syntax":"{% form %}\n {% spam_protection \"recaptcha_v2\" %}\n{% endform %}","name":"spam_protection","parameters":[{"description":"name of protection strategy. Default is recaptcha_v2","name":"strategy","required":false,"types":["untyped"]},{"description":"action name for reCAPTCHA V3, action may only contain alphanumeric characters and slashes","name":"action","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {% spam_protection \"recaptcha_v2\" %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {% spam_protection \"recaptcha_v3\", action: \"signup\" %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% form %}\n {% spam_protection \"hcaptcha\" %}\n{% endform %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"html","deprecated":false,"deprecation_reason":"","description":"\u003e Note:\n\u003e If you reference [color settings](/themes/architecture/settings/input-settings#color) inside `style` tags, then\n\u003e the associated CSS rules will update as the setting is changed in the theme editor, without a page refresh.","parameters":[],"summary":"Generates an HTML `\u003cstyle\u003e` tag with an attribute of `data-shopify`.","name":"style","syntax":"{% style %}\n CSS_rules\n{% endstyle %}","syntax_keywords":[{"keyword":"CSS_rules","description":"The desired CSS rules for the `\u003cstyle\u003e` tag."}],"examples":[{"name":"","description":"","syntax":"","path":"/","raw_liquid":"{% style %}\n .h1 {\n color: {{ settings.colors_accent_1 }};\n }\n{% endstyle %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"iteration","deprecated":false,"deprecation_reason":"","description":"The `tablerow` tag must be wrapped in HTML `\u003ctable\u003e` and `\u003c/table\u003e` tags.\n\n\u003e Tip:\n\u003e Every `tablerow` loop has an associated [`tablerowloop` object](/docs/api/liquid/objects/tablerowloop) with information about the loop.","parameters":[{"description":"The number of columns that the table should have.","name":"cols","required":false,"types":["number"]},{"description":"The number of iterations to perform.","name":"limit","required":false,"types":["number"]},{"description":"The 1-based index to start iterating at.","name":"offset","required":false,"types":["number"]},{"description":"A custom numeric range to iterate over.","name":"range","required":false,"types":["untyped"]}],"summary":"Generates HTML table rows for every item in an array.","name":"tablerow","syntax":"{% tablerow variable in array %}\n expression\n{% endtablerow %}","syntax_keywords":[{"keyword":"variable","description":"The current item in the array."},{"keyword":"array","description":"The array to iterate over."},{"keyword":"expression","description":"The expression to render."}],"examples":[{"name":"","description":"","syntax":"","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":false,"display_type":"text","show_data_tab":true},{"name":"cols","description":"You can define how many columns the table should have using the `cols` parameter.","syntax":"{% tablerow variable in array cols: number %}\n expression\n{% endtablerow %}\n","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products cols: 2 %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true},{"name":"limit","description":"You can limit the number of iterations using the `limit` parameter.","syntax":"{% tablerow variable in array limit: number %}\n expression\n{% endtablerow %}\n","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products limit: 2 %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true},{"name":"offset","description":"You can specify a 1-based index to start iterating at using the `offset` parameter.","syntax":"{% tablerow variable in array offset: number %}\n expression\n{% endtablerow %}\n","path":"/collections/sale-potions","raw_liquid":"\u003ctable\u003e\n {% tablerow product in collection.products offset: 2 %}\n {{ product.title }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true},{"name":"range","description":"Instead of iterating over specific items in an array, you can specify a numeric range to iterate over.\n\n\u003e Note:\n\u003e You can define the range using both literal and variable values.\n","syntax":"{% tablerow variable in (number..number) %}\n expression\n{% endtablerow %}\n","path":"/","raw_liquid":"\u003ctable\u003e\n {% tablerow i in (1..3) %}\n {{ i }}\n {% endtablerow %}\n\u003c/table\u003e\n\n{%- assign lower_limit = 2 -%}\n{%- assign upper_limit = 4 -%}\n\n\u003ctable\u003e\n {% tablerow i in (lower_limit..upper_limit) %}\n {{ i }}\n {% endtablerow %}\n\u003c/table\u003e","parameter":true,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to specify search paths for theme partials via app/config.yml property \"theme_render_paths\"\n\nAssuming app/config.yml looks like this:\n\ntheme_search_paths :\n- theme/{{ context.constants.MY_THEME | default: \"custom\" }}\n- theme/simple","syntax":"\nWhen you render a partial using theme_render\n\n{% theme_render_rc 'product' %}\n\nThe system will try to render theme/custom/product, and if it does not exist, it will fallback to theme/simple/product (if it also does not exist, the missing partial error is raised)","name":"theme_render_rc","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"\nWhen you render a partial using theme_render\n\n{% theme_render_rc 'product' %}\n\nThe system will try to render theme/custom/product, and if it does not exist, it will fallback to theme/simple/product (if it also does not exist, the missing partial error is raised)","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Allows to catch errors, especially useful with `liquid_raise_mode: true` setting in app/config.yml.","syntax":"{% liquid\n try\n include template_path\n catch err\n unless err.message contains \"can't find partial\"\n log err, type: 'error when including template file'\n endunless\n include fallback_template_path\n endtry\n%}","name":"try","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n try\n include template_path\n catch err\n unless err.message contains \"can't find partial\"\n log err, type: 'error when including template file'\n endunless\n include fallback_template_path\n endtry\n%}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"conditional","deprecated":false,"deprecation_reason":"","description":"\u003e Tip:\n\u003e Similar to the [`if` tag](/docs/api/liquid/tags/if), you can use `elsif` to add more conditions to an `unless` tag.","parameters":[],"summary":"Renders an expression unless a specific condition is `true`.","name":"unless","syntax":"{% unless condition %}\n expression\n{% endunless %}","syntax_keywords":[{"keyword":"condition","description":"The condition to evaluate."},{"keyword":"expression","description":"The expression to render unless the condition is met."}],"examples":[{"name":"","description":"","syntax":"","path":"/products/health-potion","raw_liquid":"{% unless product.has_only_default_variant %}\n // Variant selection functionality\n{% endunless %}","parameter":false,"display_type":"text","show_data_tab":true}]},{"category":"platformOS","deprecated":false,"deprecation_reason":"","description":"Execute code wrapped inside content_for","syntax":"Use this in a liquid view first. Then you can use yield inside the layout (for example) or another subsequently rendered view, like below:\n{% content_for 'greeting' %}Hello world{% endcontent_for %}\n\n# another_file.liquid\n{% yield 'greeting' %}","name":"yield","parameters":[{"description":"name of content_for block","name":"name","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"Use this in a liquid view first. Then you can use yield inside the layout (for example) or another subsequently rendered view, like below:\n{% content_for 'greeting' %}Hello world{% endcontent_for %}\n\n# another_file.liquid\n{% yield 'greeting' %}","parameter":false,"display_type":"text","show_data_tab":true}]}]
5
5
 
6
6
 
@@ -13,6 +13,7 @@ module PlatformosCheck
13
13
 
14
14
  PlatformosLiquid::SourceIndex
15
15
  .objects
16
+ .select(&:global?)
16
17
  .select { |object| object.name.start_with?(partial(variable_lookup)) }
17
18
  .map { |object| object_to_completion(object) }
18
19
  end
@@ -5,34 +5,29 @@ module PlatformosCheck
5
5
  class TagCompletionProvider < CompletionProvider
6
6
  def completions(context)
7
7
  content = context.content
8
- cursor = context.cursor
9
8
 
10
9
  return [] if content.nil?
11
- return [] unless can_complete?(content, cursor)
10
+ return [] unless can_complete?(context)
12
11
 
13
- partial = first_word(content) || ''
14
- labels = PlatformosLiquid::Tag.labels
15
- labels += PlatformosLiquid::Tag.end_labels
16
- labels
17
- .select { |w| w.start_with?(partial) }
18
- .map { |tag| tag_to_completion(tag) }
12
+ partial = first_word(context.buffer.lines[context.line]) || ''
13
+ PlatformosLiquid::SourceIndex.tags.select { |tag| tag.name.start_with?(partial) }
14
+ .map { |tag| tag_to_completion(tag) }
19
15
  end
20
16
 
21
- def can_complete?(content, cursor)
22
- content.start_with?(Liquid::TagStart) && (
23
- cursor_on_first_word?(content, cursor) ||
24
- cursor_on_start_content?(content, cursor, Liquid::TagStart)
25
- )
17
+ def can_complete?(context)
18
+ context.content.start_with?(Liquid::TagStart) && (cursor_on_first_word?(context.buffer.lines[context.line], context.col) || cursor_on_start_content?(context.buffer.lines[context.line], context.col, Liquid::TagStart))
26
19
  end
27
20
 
28
21
  private
29
22
 
30
23
  def tag_to_completion(tag)
31
- content = PlatformosLiquid::Documentation.tag_doc(tag)
24
+ content = PlatformosLiquid::Documentation.tag_doc(tag.name)
32
25
 
33
26
  {
34
- label: tag,
27
+ contents: content,
28
+ label: tag.name,
35
29
  kind: CompletionItemKinds::KEYWORD,
30
+ **format_hash(tag),
36
31
  **doc_hash(content)
37
32
  }
38
33
  end
@@ -24,7 +24,7 @@ module PlatformosCheck
24
24
 
25
25
  CAPABILITIES = {
26
26
  completionProvider: {
27
- triggerCharacters: ['.', '{{ ', '{% '],
27
+ triggerCharacters: ['.', '{{ ', '{% ', '/'],
28
28
  context: true
29
29
  },
30
30
  codeActionProvider: {
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PlatformosCheck
4
+ module LanguageServer
5
+ class TagHoverProvider < HoverProvider
6
+ def completions(context)
7
+ content = context.content
8
+
9
+ return [] if content.nil?
10
+ return [] unless can_complete?(context)
11
+
12
+ partial = first_word(context.buffer.lines[context.line]) || ''
13
+ PlatformosLiquid::SourceIndex.tags.select { |tag| tag.name.start_with?(partial) }
14
+ .map { |tag| tag_to_completion(tag) }.first
15
+ end
16
+
17
+ def can_complete?(context)
18
+ context.content.start_with?(Liquid::TagStart) && (cursor_on_first_word?(context.buffer.lines[context.line], context.col) || cursor_on_start_content?(context.buffer.lines[context.line], context.col, Liquid::TagStart))
19
+ end
20
+
21
+ private
22
+
23
+ def tag_to_completion(tag)
24
+ content = PlatformosLiquid::Documentation.tag_doc(tag.name)
25
+
26
+ {
27
+ contents: content,
28
+ label: tag.name,
29
+ kind: CompletionItemKinds::KEYWORD,
30
+ **format_hash(tag),
31
+ **doc_hash(content)
32
+ }
33
+ end
34
+ end
35
+ end
36
+ end
@@ -13,18 +13,18 @@ module PlatformosCheck
13
13
 
14
14
  files
15
15
  .select { |x| x.name.start_with?(@file_name) }
16
- .map { |x| file_to_completion(x) }
16
+ .map { |x| file_to_completion(x, context) }
17
17
  end
18
18
 
19
19
  private
20
20
 
21
21
  def cursor_on_quoted_argument?(content, cursor)
22
- match = content.match(regexp)
23
- return false if match.nil?
22
+ @match = content.match(regexp)
23
+ return false if @match.nil?
24
24
 
25
- return false unless match.begin(:partial) <= cursor && cursor <= match.end(:partial)
25
+ return false unless @match.begin(:partial) <= cursor && cursor <= @match.end(:partial)
26
26
 
27
- @file_name = match[:partial]
27
+ @file_name = @match[:partial][0, cursor - @match.begin(:partial)]
28
28
  true
29
29
  end
30
30
 
@@ -36,11 +36,34 @@ module PlatformosCheck
36
36
  raise NotImplementedError
37
37
  end
38
38
 
39
- def file_to_completion(file)
39
+ def file_to_completion(file, context)
40
40
  {
41
41
  label: file.name,
42
- kind: CompletionItemKinds::SNIPPET,
43
- detail: file.source
42
+ kind: CompletionItemKinds::TEXT,
43
+ detail: file.source,
44
+ textEdit: {
45
+ newText: file.name,
46
+ insert: {
47
+ start: {
48
+ line: context.line,
49
+ character: @match.begin(:partial)
50
+ },
51
+ end: {
52
+ line: context.line,
53
+ character: @match.end(:partial)
54
+ }
55
+ },
56
+ replace: {
57
+ start: {
58
+ line: context.line,
59
+ character: @match.begin(:partial)
60
+ },
61
+ end: {
62
+ line: context.line,
63
+ character: @match.end(:partial)
64
+ }
65
+ }
66
+ }
44
67
  }
45
68
  end
46
69
  end
@@ -14,6 +14,10 @@ module PlatformosCheck
14
14
  def platformos_documentation_url
15
15
  "#{PLATFORMOS_DOCUMENTATION_URL}/developer-guide/variables/context-variable##{hash['name']}"
16
16
  end
17
+
18
+ def global?
19
+ hash.dig('access', 'global')
20
+ end
17
21
  end
18
22
  end
19
23
  end
@@ -15,6 +15,34 @@ module PlatformosCheck
15
15
  }
16
16
  end
17
17
 
18
+ def description
19
+ @descritpion = begin
20
+ desc = hash['description']&.strip || ''
21
+ desc = '' if desc == 'returns'
22
+ if parameters.any?
23
+ desc += "\n\n---\n\nParameters:"
24
+ parameters.each { |p| desc += "\n- #{p.full_summary}" }
25
+ end
26
+ if hash['return_type']&.any?
27
+ rt = hash['return_type'].first
28
+ rt['description'] = nil if rt['description']&.strip == ''
29
+ desc += "\n\nReturns:"
30
+ desc += "\n- #{[rt['type'], rt['description']].compact.join(': ')}\n"
31
+ end
32
+ if hash['examples']
33
+ desc += "\n\n---\n\n"
34
+ hash['examples'].each_with_index do |e, i|
35
+ example = e['raw_liquid'].gsub(/[\n]+/, "\n").strip.split('=>')
36
+ input = example[0]&.strip
37
+ output = example[1]&.strip
38
+ desc += "\n - Example #{i}:\n\n```liquid\n#{input}\n```"
39
+ desc += "\n##\nOutput: #{output}" if output
40
+ end
41
+ end
42
+ end
43
+ desc
44
+ end
45
+
18
46
  def platformos_documentation_url
19
47
  "#{PLATFORMOS_DOCUMENTATION_URL}/api-reference/liquid/tags/#{hash['name']}"
20
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlatformosCheck
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platformos-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Bliszczyk
@@ -237,6 +237,7 @@ files:
237
237
  - lib/platformos_check/language_server/hover_engine.rb
238
238
  - lib/platformos_check/language_server/hover_provider.rb
239
239
  - lib/platformos_check/language_server/hover_providers/filter_hover_provider.rb
240
+ - lib/platformos_check/language_server/hover_providers/tag_hover_provider.rb
240
241
  - lib/platformos_check/language_server/io_messenger.rb
241
242
  - lib/platformos_check/language_server/messenger.rb
242
243
  - lib/platformos_check/language_server/partial_completion_provider.rb