@platformos/platformos-check-docs-updater 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -438,7 +438,9 @@ Input for API call request details
438
438
  """
439
439
  input ApiCallSendRequestInput {
440
440
  """
441
- The body of the API call
441
+ The body of the API call, delivered verbatim - it is not parsed as a Liquid
442
+ template and may contain binary data (e.g. an encrypted Web Push payload built
443
+ with the base64_decode filter)
442
444
  """
443
445
  body: String
444
446
 
@@ -507,6 +509,10 @@ type AssetCollection {
507
509
  }
508
510
 
509
511
  input AssetInput {
512
+ """
513
+ Cache-Control header value for the asset (e.g., "max-age=315576000, public")
514
+ """
515
+ cache_control: String
510
516
  file_size: Int
511
517
 
512
518
  """
@@ -526,7 +532,13 @@ input AssetInput {
526
532
  manual/public/assets/logo.png
527
533
  """
528
534
  physical_file_path: String!
529
- url: String!
535
+
536
+ """
537
+ Optional explicit URL. When provided, it is stored on the asset (raw_url) and
538
+ used verbatim in the response url field (with /instances/<n>/assets/ host+id
539
+ normalisation). Omit to leave raw_url alone; new assets default to a name+CDN derived URL.
540
+ """
541
+ url: String
530
542
  }
531
543
 
532
544
  input AssetPresignInput {
@@ -541,6 +553,11 @@ input AssetUpdateAllInput {
541
553
  }
542
554
 
543
555
  input AssetUpdateInput {
556
+ """
557
+ Cache-Control header value for the asset (e.g., "max-age=315576000, public")
558
+ """
559
+ cache_control: String
560
+
544
561
  """
545
562
  defines whether this object will be manually managed, meaning it will not be affected via pos-cli deploy / sync
546
563
  """
@@ -6123,6 +6140,15 @@ enum PageHandler {
6123
6140
  }
6124
6141
 
6125
6142
  input PageInputType {
6143
+ """
6144
+ names of authorization policies which should be checked (the same identifier
6145
+ used in Liquid frontmatter, e.g. "page_policy" or
6146
+ "modules/my_module/page_policy"). Can be used instead of (or combined with)
6147
+ authorization_policy_ids. All names must resolve to existing
6148
+ AuthorizationPolicy records.
6149
+ """
6150
+ authorization_policies: [String]
6151
+
6126
6152
  """
6127
6153
  ids of authorization policies which should be checked
6128
6154
  """
@@ -7577,6 +7603,22 @@ input QueryModelSchema {
7577
7603
  names: [String]
7578
7604
  }
7579
7605
 
7606
+ """
7607
+ Execution options for this query
7608
+ """
7609
+ input QueryOptionsInput {
7610
+ """
7611
+ Execute against the read replica database when one is configured; falls back
7612
+ to the primary database otherwise. Routing applies to the whole operation.
7613
+ """
7614
+ read_replica: Boolean = false
7615
+
7616
+ """
7617
+ Database statement timeout in seconds applied to the whole operation. Defaults to 19 seconds.
7618
+ """
7619
+ timeout: Int = 19
7620
+ }
7621
+
7580
7622
  input QueryTransactableType {
7581
7623
  id: Int
7582
7624
  ids: [Int]
@@ -9938,7 +9980,7 @@ type RootQuery {
9938
9980
  admin_transactable_schemas(filter: TransactableSchemasFilterInput, page: Int = 1, per_page: Int = 20, sort: [TransactableSchemasSortInput!]): TransactableSchemaCollection! @doc(category: "Admin")
9939
9981
  admin_user_profile_schemas(filter: UserProfileSchemasFilterInput, page: Int = 1, per_page: Int = 20, sort: [UserProfileSchemasSortInput!]): UserProfileSchemaCollection! @doc(category: "Admin")
9940
9982
  admin_user_schema: UserSchema! @doc(category: "Admin")
9941
- admin_versions(filter: VersionFilterInput, page: Int = 1, per_page: Int = 20, sort: [VersionSortInput!]): VersionCollection! @doc(category: "Admin")
9983
+ admin_versions(filter: VersionFilterInput, options: QueryOptionsInput, page: Int = 1, per_page: Int = 20, sort: [VersionSortInput!]): VersionCollection! @doc(category: "Admin")
9942
9984
  cms_discovery(types: [CMSItemType]): CMSItemDefinitionCollection @deprecated(reason: "Use admin_* queries") @doc(category: "Deprecated")
9943
9985
  cms_items(page: Int = 1, per_page: Int, type: CMSItemType!): CMSItemPayloadCollection @deprecated(reason: "Use admin_* queries") @doc(category: "Deprecated")
9944
9986
  constant(filter: EncryptedConstantFilterInput): EncryptedConstant @deprecated(reason: "Use constants") @doc(category: "Deprecated")
@@ -10026,7 +10068,7 @@ type RootQuery {
10026
10068
  """
10027
10069
  Returns collection of all Embeddings in the system.
10028
10070
  """
10029
- embeddings_rc(filter: EmbeddingsFilterInput, page: Int = 1, per_page: Int!, sort: [EmbeddingsSortInput!]): EmbeddingCollection! @doc(category: "Data")
10071
+ embeddings_rc(filter: EmbeddingsFilterInput, options: QueryOptionsInput, page: Int = 1, per_page: Int!, sort: [EmbeddingsSortInput!]): EmbeddingCollection! @doc(category: "Data")
10030
10072
  feeds: [ActivityStreamsFeed] @doc(category: "Activity feeds")
10031
10073
  handlers(page: Int = 1, per_page: Int = 20): ActivityStreamsHandlerCollection @doc(category: "Activity feeds")
10032
10074
  images(filter: ImagesFilterInput, page: Int = 1, per_page: Int!, sort: [ImagesSortInput!]): CustomImageCollection! @deprecated(reason: "Use property upload") @doc(category: "Deprecated")
@@ -10054,7 +10096,7 @@ type RootQuery {
10054
10096
  """
10055
10097
  Returns collection of all Models in the system, including soft deleted items.
10056
10098
  """
10057
- models(filter: ModelsFilterInput, page: Int = 1, per_page: Int!, sort: [ModelsSortInput!]): ModelCollection! @deprecated(reason: "Use records") @doc(category: "Deprecated")
10099
+ models(filter: ModelsFilterInput, options: QueryOptionsInput, page: Int = 1, per_page: Int!, sort: [ModelsSortInput!]): ModelCollection! @deprecated(reason: "Use records") @doc(category: "Deprecated")
10058
10100
  pages(
10059
10101
  """
10060
10102
  deprecated use filter: { metadata: { exclude: $exclude }}
@@ -10106,7 +10148,7 @@ type RootQuery {
10106
10148
  """
10107
10149
  Returns collection of all Records in the system.
10108
10150
  """
10109
- records(filter: RecordsFilterInput, page: Int = 1, per_page: Int!, sort: [RecordsSortInput!]): RecordCollection! @doc(category: "Data")
10151
+ records(filter: RecordsFilterInput, options: QueryOptionsInput, page: Int = 1, per_page: Int!, sort: [RecordsSortInput!]): RecordCollection! @doc(category: "Data")
10110
10152
 
10111
10153
  """
10112
10154
  Returns collection of remote Records.
@@ -10177,8 +10219,8 @@ type RootQuery {
10177
10219
  """
10178
10220
  Finds non deleted users based on arguments provided
10179
10221
  """
10180
- user(email: String, external_id: String, id: ID, is_deleted: Boolean, slug: String): User @deprecated(reason: "Use users") @doc(category: "Deprecated")
10181
- users(filter: UsersFilterInput, page: Int = 1, per_page: Int!, sort: [UsersSortInput!]): UserCollection! @doc(category: "Data")
10222
+ user(email: String, external_id: String, id: ID, is_deleted: Boolean, options: QueryOptionsInput, slug: String): User @deprecated(reason: "Use users") @doc(category: "Deprecated")
10223
+ users(filter: UsersFilterInput, options: QueryOptionsInput, page: Int = 1, per_page: Int!, sort: [UsersSortInput!]): UserCollection! @doc(category: "Data")
10182
10224
  }
10183
10225
 
10184
10226
  enum SelectPropertyTypeEnum {
@@ -11524,6 +11566,15 @@ input UpdateModelSchemaInputType {
11524
11566
  }
11525
11567
 
11526
11568
  input UpdatePageInputType {
11569
+ """
11570
+ names of authorization policies which should be checked (the same identifier
11571
+ used in Liquid frontmatter, e.g. "page_policy" or
11572
+ "modules/my_module/page_policy"). Can be used instead of (or combined with)
11573
+ authorization_policy_ids. All names must resolve to existing
11574
+ AuthorizationPolicy records.
11575
+ """
11576
+ authorization_policies: [String]
11577
+
11527
11578
  """
11528
11579
  ids of authorization policies which should be checked
11529
11580
  """
@@ -11865,7 +11916,16 @@ type User implements HasModelsInterface & HasRecordsInterface & LegacyCustomAttr
11865
11916
  """
11866
11917
  JWT token that can be used for authentication
11867
11918
  """
11868
- jwt_token(algorithm: JwtAlgorithm = HS256): String
11919
+ jwt_token(
11920
+ algorithm: JwtAlgorithm = HS256
11921
+
11922
+ """
11923
+ Number of seconds after which the token expires, clamped to a maximum of one
11924
+ year. When omitted, the token expires after the instance session timeout
11925
+ (same source as the `{% sign_in %}` tag). Expired tokens are rejected on decode.
11926
+ """
11927
+ expires_in: Int = null
11928
+ ): String
11869
11929
 
11870
11930
  """
11871
11931
  Used by translations to set the language of currently logged in user
package/data/latest.json CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- {"revision":"05ac4637cfd868fd7f72e2a1ebf40fc93428e114"}
2
+ {"revision":"ad89598bf21dc1e3caf3d5daed13214231315ee8"}
package/data/tags.json CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
 
4
4
 
5
- [{"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":"background job_id = 'path/to/partial', delay: 0.1, max_attempts: 3, source_name: 'custom_job', arg0: data","platformOS":true,"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\n{% endcache %}","platformOS":true,"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":"@example\n{% content_for 'block_identifier' %}\n\n{% endcontent_for %}","platformOS":true,"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: 'en' %}","platformOS":true,"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 [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[partial](/developer-guide/platformos-workflow/codebase#views-pages-layouts-and-partials) 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":"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":"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":"platformOS","deprecated":false,"deprecation_reason":"","description":"Makes variables defined inside partial accessible anywhere via context.exports.`namespace`","syntax":"export a, b, namespace: 'namespace'","platformOS":true,"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\" =\u003e 5, \"Poland\" =\u003e 5, \"Romania\" =\u003e 2}}}\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":"Every `for` loop has an associated [`forloop` object](/api-reference/liquid/loops#helper-variables) 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\n{% endform %}","platformOS":true,"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":"Stores a variable returned by a partial. The partial must return data using the `return` tag.\nAll variables must be passed explicitly to the function - variables from upper scope are not visible.\n\nSupports bracket notation, dot notation, and mixed notation (combining brackets and dots).\n\nVariable names must start with a letter or underscore, followed by letters, numbers, underscores, or hyphens.","syntax":"{% function variable = 'path/to/partial', arg1: value %}","platformOS":true,"name":"function","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% function result = 'partials/compute', foo: 'bar' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign data = {} %}\n{% assign data[\"foo\"] = {} %}\n{% function data[\"foo\"][\"bar\"] = 'partials/compute', input: 'baz' %}\n{{ data }} =\u003e {\"foo\":{\"bar\":\"result_from_partial\"}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign items = [] %}\n{% function items \u003c\u003c 'partials/fetch_item', id: 1 %}\n{% function items \u003c\u003c 'partials/fetch_item', id: 2 %}\n{{ items }} =\u003e [\"item_1\",\"item_2\"]","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign response = {} %}\n{% assign response[\"data\"] = [] %}\n{% function response[\"data\"] \u003c\u003c 'partials/fetch_user', id: 1 %}\n{% function response[\"data\"] \u003c\u003c 'partials/fetch_user', id: 2 %}\n{% assign response[\"metadata\"] = {} %}\n{% function response[\"metadata\"][\"total\"] = 'partials/count_users' %}\n{{ response }} =\u003e {\"data\":[\"user_1\",\"user_2\"],\"metadata\":{\"total\":2}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"# partials/greeting\n{% return 'Hello ' | append: name %}\n\n# calling code\n{% function result = 'partials/greeting', name: 'Alice' %}\n{{ result }} =\u003e Hello Alice","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign user = {} %}\n{% assign user.profile = {} %}\n{% function user.profile[\"name\"] = 'partials/get_name', id: 123 %}\n{% function user[\"email\"] = 'partials/get_email', id: 123 %}\n{{ user }} =\u003e {\"profile\":{\"name\":\"John\"},\"email\":\"john@example.com\"}","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":"{% graphql g = \"path/to/graphql\", arg0: value %}","platformOS":true,"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":"DEPRECATED: This tag is deprecated. Use {% assign %} tag instead.\nThe assign tag now supports the same hash assignment syntax.\n\nPreviously allowed to easily modify a Hash with a syntax same as assign tag.","syntax":"{% hash_assign variable['key'] = value %} (DEPRECATED - use {% assign variable['key'] = value %} instead)","platformOS":true,"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{% 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}]},{"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 partial, you can access and alter variables that are [created](/docs/api/liquid/tags/variable-tags) outside of the\npartial.","parameters":[],"summary":"Renders a [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials).","name":"include","syntax":"{% include 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the partial 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 'path/to/form' %}","platformOS":true,"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 [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[partial](/developer-guide/platformos-workflow/codebase#views-pages-layouts-and-partials) 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 variable, type: 'type' %}","platformOS":true,"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":"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 variable %}\n\n{% endparse_json %}","platformOS":true,"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":"{% print variable %}","platformOS":true,"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 '/path', status: 302 %}","platformOS":true,"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 partial, you can't directly access variables that are [created](/docs/api/liquid/tags/variable-tags) outside\nof the partial. However, you can specify variables as parameters\nto pass outside variables to partials.\n\nWhile you can't directly access created variables, you can access global objects like `context`.\n\nOutside a partial, you can't access variables created inside it.\n\n\u003e Note:\n\u003e When you render a partial using the `render` tag, you can't use the [`include` tag](/docs/api/liquid/tags/include)\n\u003e inside the partial.","parameters":[],"summary":"Renders a [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials).","name":"render","syntax":"{% render 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the partial to render, without the `.liquid` extension and `views/partials` or `lib` prefix."}],"examples":[{"name":"for","description":"You can render a partial 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 partial.\nAdditionally, you can access a [`forloop` object](/docs/api/liquid/objects/forloop) for the loop inside the partial.\n","syntax":"{% render 'filename' for array as item %}","path":"/","raw_liquid":"{% render 'filename' for array as item %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"Passing variables to a partial","description":"Variables that have been [created](/docs/api/liquid/tags/variable-tags) outside of a partial can be passed to a partial 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 partial, unless it is an array or hash.\n","syntax":"{% render 'filename', variable: value %}","path":"/","raw_liquid":"{% render 'filename', variable: value %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"with","description":"You can pass a single object to a partial using the `with` parameter. You can also supply an optional `as` parameter to specify a custom name to reference the object inside the partial.\n","syntax":"{% render 'filename' with object as name %}","path":"/","raw_liquid":"{% render 'filename' with object as name %}","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 '{\"key\": \"value\"}' %}","platformOS":true,"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 200 %}","platformOS":true,"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":"return variable","platformOS":true,"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":"Used inside a transaction to manually rollback the transaction","syntax":"rollback","platformOS":true,"name":"rollback","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n transaction\n ... some code ...\n if some_condition\n rollback\n end\n endtransaction\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 variable = \"value\" %}","platformOS":true,"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: user_id %}","platformOS":true,"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":"{% spam_protection \"recaptcha_v2\" %}","platformOS":true,"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":"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":"{% theme_render_rc 'path/to/partial' %}","platformOS":true,"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":"Wraps code in a database transaction block.\nAll database operations inside the block will be executed in a single transaction.\nIf any operation fails, all changes will be rolled back.\nIf a background job is scheduled within a transaction, it will only be added to the queue\nafter successfully committing the transaction.\nTransaction does NOT have its own scope for variables - any variable defined outside of the\ntransaction block will be available within the transaction block, and any variable defined\ninside the transaction block will be available outside of the transaction block.\nYou can manually force the rollback of the transaction through the `rollback` command.","syntax":"transaction timeout: 5","platformOS":true,"name":"transaction","parameters":[{"description":"timeout in seconds for the transaction block. If the transaction takes longer than this time, it will be aborted and everything will be rollbacked.","name":"timeout","required":false,"types":["untyped"]},{"description":"if true, forces PostgreSQL to use a custom plan for all queries inside the transaction block. Do not use this option unless you know what you are doing. Most likely this flag will be deleted in the future.","name":"force_custom_plan","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n transaction timeout: 5\n function user = 'commands/user/create', email: 'test@example.com'\n background _ = 'commands/user/send_welcome_email', user: user\n function profile = 'commands/profile/create', user_id: user.id\n unless profile.valid\n rollback\n endunless\n endtransaction\n%} # =\u003e This code guarantees that if profile.valid evaluates to true, both user\nand profile will be persisted in the DB and the welcome email will be sent. If profile.valid\nevaluates to false, or an error is raised at any point, neither user nor profile will be\npersisted and the email will not be sent.","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":"try\n\ncatch err\n\nendtry","platformOS":true,"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":"{% yield \"value\" %}","platformOS":true,"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
+ [{"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":"background job_id = 'path/to/partial', delay: 0.1, max_attempts: 3, source_name: 'custom_job', arg0: data","platformOS":true,"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\n{% endcache %}","platformOS":true,"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":"@example\n{% content_for 'block_identifier' %}\n\n{% endcontent_for %}","platformOS":true,"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: 'en' %}","platformOS":true,"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 [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[partial](/developer-guide/platformos-workflow/codebase#views-pages-layouts-and-partials) 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":"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":"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":"platformOS","deprecated":false,"deprecation_reason":"","description":"Makes variables defined inside partial accessible anywhere via context.exports.`namespace`","syntax":"export a, b, namespace: 'namespace'","platformOS":true,"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\" =\u003e 5, \"Poland\" =\u003e 5, \"Romania\" =\u003e 2}}}\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":"Every `for` loop has an associated [`forloop` object](/api-reference/liquid/loops#helper-variables) 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\n{% endform %}","platformOS":true,"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":"Stores a variable returned by a partial. The partial must return data using the `return` tag.\nAll variables must be passed explicitly to the function - variables from upper scope are not visible.\n\nSupports bracket notation, dot notation, and mixed notation (combining brackets and dots).\n\nVariable names must start with a letter or underscore, followed by letters, numbers, underscores, or hyphens.","syntax":"{% function variable = 'path/to/partial', arg1: value %}","platformOS":true,"name":"function","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% function result = 'partials/compute', foo: 'bar' %}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign data = {} %}\n{% assign data[\"foo\"] = {} %}\n{% function data[\"foo\"][\"bar\"] = 'partials/compute', input: 'baz' %}\n{{ data }} =\u003e {\"foo\":{\"bar\":\"result_from_partial\"}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign items = [] %}\n{% function items \u003c\u003c 'partials/fetch_item', id: 1 %}\n{% function items \u003c\u003c 'partials/fetch_item', id: 2 %}\n{{ items }} =\u003e [\"item_1\",\"item_2\"]","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign response = {} %}\n{% assign response[\"data\"] = [] %}\n{% function response[\"data\"] \u003c\u003c 'partials/fetch_user', id: 1 %}\n{% function response[\"data\"] \u003c\u003c 'partials/fetch_user', id: 2 %}\n{% assign response[\"metadata\"] = {} %}\n{% function response[\"metadata\"][\"total\"] = 'partials/count_users' %}\n{{ response }} =\u003e {\"data\":[\"user_1\",\"user_2\"],\"metadata\":{\"total\":2}}","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"# partials/greeting\n{% return 'Hello ' | append: name %}\n\n# calling code\n{% function result = 'partials/greeting', name: 'Alice' %}\n{{ result }} =\u003e Hello Alice","parameter":false,"display_type":"text","show_data_tab":true},{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% assign user = {} %}\n{% assign user.profile = {} %}\n{% function user.profile[\"name\"] = 'partials/get_name', id: 123 %}\n{% function user[\"email\"] = 'partials/get_email', id: 123 %}\n{{ user }} =\u003e {\"profile\":{\"name\":\"John\"},\"email\":\"john@example.com\"}","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":"{% graphql g = \"path/to/graphql\", arg0: value %}","platformOS":true,"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":"Split arguments across multiple lines inside a {% liquid %} block:\n{% liquid\n graphql g = \"get_models\",\n model_id: context.params.slug2,\n user_id: context.params.user_id\n%}","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":"DEPRECATED: This tag is deprecated. Use {% assign %} tag instead.\nThe assign tag now supports the same hash assignment syntax.\n\nPreviously allowed to easily modify a Hash with a syntax same as assign tag.","syntax":"{% hash_assign variable['key'] = value %} (DEPRECATED - use {% assign variable['key'] = value %} instead)","platformOS":true,"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{% 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}]},{"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":false,"deprecation_reason":"","description":"Inside the partial, you can access and alter variables that are [created](/docs/api/liquid/tags/variable-tags) outside of the\npartial. Prefer [`render`](/docs/api/liquid/tags/render) for self-contained partials; use `include` when the partial must run in the caller's scope.","parameters":[],"summary":"Renders a [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials).","name":"include","syntax":"{% include 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the partial 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 'path/to/form' %}","platformOS":true,"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 [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials), [template](/themes/architecture/templates),\nor [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across\n[partial](/developer-guide/platformos-workflow/codebase#views-pages-layouts-and-partials) 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 variable, type: 'type' %}","platformOS":true,"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":"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 variable %}\n\n{% endparse_json %}","platformOS":true,"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":"{% print variable %}","platformOS":true,"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 '/path', status: 302 %}","platformOS":true,"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 partial, you can't directly access variables that are [created](/docs/api/liquid/tags/variable-tags) outside\nof the partial. However, you can specify variables as parameters\nto pass outside variables to partials.\n\nWhile you can't directly access created variables, you can access global objects like `context`.\n\nOutside a partial, you can't access variables created inside it.\n\n\u003e Note:\n\u003e When you render a partial using the `render` tag, you can't use the [`include` tag](/docs/api/liquid/tags/include)\n\u003e inside the partial.","parameters":[],"summary":"Renders a [partial](/developer-guide/platformos-workflow/directory-structure#views-pages-layouts-and-partials).","name":"render","syntax":"{% render 'filename' %}","syntax_keywords":[{"keyword":"filename","description":"The name of the partial to render, without the `.liquid` extension and `views/partials` or `lib` prefix."}],"examples":[{"name":"for","description":"You can render a partial 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 partial.\nAdditionally, you can access a [`forloop` object](/docs/api/liquid/objects/forloop) for the loop inside the partial.\n","syntax":"{% render 'filename' for array as item %}","path":"/","raw_liquid":"{% render 'filename' for array as item %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"Passing variables to a partial","description":"Variables that have been [created](/docs/api/liquid/tags/variable-tags) outside of a partial can be passed to a partial 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 partial, unless it is an array or hash.\n","syntax":"{% render 'filename', variable: value %}","path":"/","raw_liquid":"{% render 'filename', variable: value %}","parameter":true,"display_type":"text","show_data_tab":true},{"name":"with","description":"You can pass a single object to a partial using the `with` parameter. You can also supply an optional `as` parameter to specify a custom name to reference the object inside the partial.\n","syntax":"{% render 'filename' with object as name %}","path":"/","raw_liquid":"{% render 'filename' with object as name %}","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 '{\"key\": \"value\"}' %}","platformOS":true,"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 200 %}","platformOS":true,"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":"return variable","platformOS":true,"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":"Used inside a transaction to manually rollback the transaction","syntax":"rollback","platformOS":true,"name":"rollback","parameters":[],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n transaction\n ... some code ...\n if some_condition\n rollback\n end\n endtransaction\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 variable = \"value\" %}","platformOS":true,"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: user_id %}","platformOS":true,"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":"{% spam_protection \"recaptcha_v2\" %}","platformOS":true,"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":"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":"{% theme_render_rc 'path/to/partial' %}","platformOS":true,"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":"Wraps code in a database transaction block.\nAll database operations inside the block will be executed in a single transaction.\nIf any operation fails, all changes will be rolled back.\nIf a background job is scheduled within a transaction, it will only be added to the queue\nafter successfully committing the transaction.\nTransaction does NOT have its own scope for variables - any variable defined outside of the\ntransaction block will be available within the transaction block, and any variable defined\ninside the transaction block will be available outside of the transaction block.\nYou can manually force the rollback of the transaction through the `rollback` command.","syntax":"transaction timeout: 5","platformOS":true,"name":"transaction","parameters":[{"description":"timeout in seconds for the transaction block. If the transaction takes longer than this time, it will be aborted and everything will be rollbacked.","name":"timeout","required":false,"types":["untyped"]},{"description":"if true, forces PostgreSQL to use a custom plan for all queries inside the transaction block. Do not use this option unless you know what you are doing. Most likely this flag will be deleted in the future.","name":"force_custom_plan","required":false,"types":["untyped"]}],"return_type":[],"examples":[{"name":"","description":"","syntax":"","path":"","raw_liquid":"{% liquid\n transaction timeout: 5\n function user = 'commands/user/create', email: 'test@example.com'\n background _ = 'commands/user/send_welcome_email', user: user\n function profile = 'commands/profile/create', user_id: user.id\n unless profile.valid\n rollback\n endunless\n endtransaction\n%} # =\u003e This code guarantees that if profile.valid evaluates to true, both user\nand profile will be persisted in the DB and the welcome email will be sent. If profile.valid\nevaluates to false, or an error is raised at any point, neither user nor profile will be\npersisted and the email will not be sent.","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":"try\n\ncatch err\n\nendtry","platformOS":true,"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":"{% yield \"value\" %}","platformOS":true,"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}]}]
6
6
 
7
7