action
Last updated
Was this helpful?
Last updated
Was this helpful?
The action tag renders an in JSON, which in turn defines work to be performed by an .
This tag has several usage styles, each style resulting in valid JSON for an action object.
This usage style offers the lightest form of abstraction, in that it only abstracts away { "action": ... }
layer of the resulting JSON object. Use this style when it's necessary to also provide , in addition to the action's type and options.
đ This is the most common style of usage. The action type is given as an argument to the Liquid tag itself, and the action options are given in JSON in the tag's body.
Useful for action types that accept an array of options, this usage style accepts the action type as the first tag argument, and the following two or more positional arguments are used as options. This syntax does not have a closing {% endaction %}
tag.
This usage style is appropriate for action types that accept a single-level, un-nested object of options. The action type is given as the first argument, and the mapping of values that follow is used as the action's options. This syntax does not have a closing {% endaction %}
tag.
This usage style accepts two arguments: the action type, and the action options. The action options may be given as a simple scalar value, or may be given as a variable reference to any Liquid variable. This syntax does not have a closing {% endaction %}
tag.