UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

1,646 lines • 632 kB
[ { "access": { "global": false, "parents": [ { "object": "product", "property": "media" }, { "object": "product", "property": "featured_media" }, { "object": "variant", "property": "featured_media" } ], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "The `media` object can be returned by the [`product.media` array](/docs/api/liquid/objects/product#product-media) or a\n[`file_reference` metafield](/apps/metafields/types).\n\nYou can use [media filters](/docs/api/liquid/filters/media-filters) to generate URLs and media displays. To learn about how\nto use media in your theme, refer to [Support product media](/themes/product-merchandising/media/support-media).\n\n> Note:\n> Each media type has unique properties in addition to the general `media` properties. To learn about these\n> additional properties, refer to the reference for each type.", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The ID of the media.", "name": "id" }, { "deprecated": false, "deprecation_reason": "", "description": "If the source is a [`file_reference` metafield](/apps/metafields/types), then `nil` is returned.", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The position of the media in the [`product.media` array](/docs/api/liquid/objects/product#product-media).", "name": "position" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [ { "name": "Filter for media of a specific type", "description": "You can use the `media_type` property with the [`where` filter](/docs/api/liquid/filters/where) to filter the [`product.media` array](/docs/api/liquid/objects/product#product-media) for all media of a desired type.\n", "syntax": "", "path": "/products/snake-venom", "raw_liquid": "{% assign images = product.media | where: 'media_type', 'image' %}\n\n{% for image in images %}\n {{- image | image_url: width: 300 | image_tag }}\n{% endfor %}", "parameter": false, "display_type": "text", "show_data_tab": true } ], "return_type": [ { "type": "string", "name": "image", "description": "", "array_value": "" }, { "type": "string", "name": "model", "description": "", "array_value": "" }, { "type": "string", "name": "video", "description": "", "array_value": "" }, { "type": "string", "name": "external_video", "description": "", "array_value": "" } ], "summary": "The media type.", "name": "media_type" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> Preview images don't have an ID attribute.", "examples": [], "return_type": [ { "type": "image", "name": "", "description": "", "array_value": "" } ], "summary": "A preview image of the media.", "name": "preview_image" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The alt text of the media.", "name": "alt" } ], "summary": "An abstract media object that can represent the following object types:\n\n- [`image`](/docs/api/liquid/objects/image)\n- [`model`](/docs/api/liquid/objects/model)\n- [`video`](/docs/api/liquid/objects/video)\n- [`external_video`](/docs/api/liquid/objects/external_video)", "name": "media", "examples": [], "json_data": { "path": "/products/dandelion-milk", "handle": "product.media[0]", "data_from_file": "" }, "return_type": [] }, { "access": { "global": false, "parents": [ { "object": "checkout", "property": "billing_address" }, { "object": "checkout", "property": "shipping_address" }, { "object": "customer", "property": "addresses" }, { "object": "customer", "property": "default_address" }, { "object": "location", "property": "address" }, { "object": "order", "property": "billing_address" }, { "object": "order", "property": "shipping_address" }, { "object": "shop", "property": "address" } ], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "> Tip:\n> Use the [`format_address` filter](/docs/api/liquid/filters/format_address) to output an address according to its locale.", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "If no company is specified, then `nil` is returned.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The company of the address.", "name": "company" }, { "deprecated": false, "deprecation_reason": "", "description": "If no phone number is specified, then `nil` is returned.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The phone number of the address.", "name": "phone" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The first name of the address.", "name": "first_name" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The last name of the address.", "name": "last_name" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "A combination of the first and last names of the address.", "name": "name" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> This only applies to customer addresses.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The relative URL for the address.", "name": "url" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "A summary of the address, including the following properties:\n\n- First and last name\n- First and second lines\n- City\n- Province\n- Country", "name": "summary" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The ID of the address.", "name": "id" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The first line of the address.", "name": "address1" }, { "deprecated": false, "deprecation_reason": "", "description": "If no second line is specified, then `nil` is returned.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The second line of the address.", "name": "address2" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The city of the address.", "name": "city" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The zip or postal code of the address.", "name": "zip" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The country of the address in [ISO 3166-1 (alpha 2) format](https://www.iso.org/glossary-for-iso-3166.html).", "name": "country_code" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> The value doesn't include the preceding [ISO 3166-1](https://www.iso.org/glossary-for-iso-3166.html) country code.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The province of the address in [ISO 3166-2 (alpha 2) format](https://www.iso.org/glossary-for-iso-3166.html).", "name": "province_code" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "country", "name": "", "description": "", "array_value": "" } ], "summary": "The country of the address.", "name": "country" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "A combination of the first and second lines of the address.", "name": "street" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The province of the address.", "name": "province" } ], "summary": "An address, such as a customer address or order shipping address.", "name": "address", "examples": [], "json_data": { "path": "/", "handle": "shop.address", "data_from_file": "" }, "return_type": [] }, { "access": { "global": true, "parents": [], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [], "summary": "All of the [collections](/docs/api/liquid/objects/collection) on a store.", "name": "collections", "examples": [ { "name": "Iterate over the collections", "description": "You can iterate over `collections` to build a collection list.\n", "syntax": "", "path": "/", "raw_liquid": "{% for collection in collections %}\n {{- collection.title | link_to: collection.url }}\n{% endfor %}", "parameter": false, "display_type": "text", "show_data_tab": true }, { "name": "Access a specific collection", "description": "You can use `collections` to access a collection by its [handle](/docs/api/liquid/basics#handles).\n", "syntax": "", "path": "/", "raw_liquid": "{% for product in collections['sale-potions'].products %}\n {{- product.title | link_to: product.url }}\n{% endfor %}", "parameter": false, "display_type": "text", "show_data_tab": true } ], "json_data": { "path": "", "handle": "", "data_from_file": "" }, "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "collection" } ] }, { "access": { "global": true, "parents": [], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [], "summary": "All of the [pages](/docs/api/liquid/objects/page) on a store.", "name": "pages", "examples": [ { "name": "", "description": "You can access a specific page through the `pages` object using the page's [handle](/docs/api/liquid/basics#handles).\n", "syntax": "", "path": "/", "raw_liquid": "{{ pages.contact.title }}\n{{ pages['about-us'].title }}", "parameter": false, "display_type": "text", "show_data_tab": true }, { "name": "Paginate the `pages` object", "description": "You can [paginate](/docs/api/liquid/tags/paginate) the `pages` object, allowing you to iterate over up to 50 pages at a time.\n", "syntax": "", "path": "/", "raw_liquid": "{% paginate pages by 2 -%}\n {% for page in pages -%}\n {{ page.title | link_to: page.url }}\n {%- endfor %}\n\n {{- paginate | default_pagination }}\n{%- endpaginate %}", "parameter": false, "display_type": "text", "show_data_tab": true } ], "json_data": { "path": "", "handle": "", "data_from_file": "" }, "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "page" } ] }, { "access": { "global": true, "parents": [], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> The `all_products` object has a limit of 20 unique handles per page. If you want more than 20 products,\nthen consider using a collection instead.", "properties": [], "summary": "All of the products on a store.", "name": "all_products", "examples": [ { "name": "", "description": "You can use `all_products` to access a product by its [handle](/docs/api/liquid/basics#handles). This returns the [`product`](/docs/api/liquid/objects/product) object for the specified product. If the product isn't found, then `empty` is returned.", "syntax": "", "path": "/", "raw_liquid": "{{ all_products['love-potion'].title }}", "parameter": false, "display_type": "text", "show_data_tab": true } ], "json_data": { "path": "", "handle": "", "data_from_file": "" }, "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "product" } ] }, { "access": { "global": false, "parents": [], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [], "summary": "The [metafields](/docs/api/liquid/objects/metafield) that are [owned by the app](/apps/metafields/app-owned).", "name": "metafields" } ], "summary": "An app. This object is usually used to access app-specific information for use with [theme app extensions](/apps/online-store/theme-app-extensions).", "name": "app", "examples": [], "json_data": { "path": "", "handle": "", "data_from_file": "" }, "return_type": [] }, { "access": { "global": false, "parents": [ { "object": "cart", "property": "discounts" }, { "object": "line_item", "property": "discounts" }, { "object": "order", "property": "discounts" }, { "object": "checkout", "property": "discount" } ], "template": [] }, "deprecated": true, "deprecation_reason": "Deprecated because not all discount types and details are captured.\n\nThe `discount` object has been replaced by the [`discount_allocation`](/docs/api/liquid/objects/discount_allocation) and\n[`discount_application`](/docs/api/liquid/objects/discount_application) objects.", "description": "", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> This is the same value as [`discount.total_amount`](/docs/api/liquid/objects/discount#discount-total_amount).\n\nThe value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The amount of the discount in the currency's subunit.", "name": "amount" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> This is the same value as [`discount.amount`](/docs/api/liquid/objects/discount#discount-amount).\n\nThe value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The amount of the discount in the currency's subunit.", "name": "total_amount" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> This is the same value as [`discount.title`](/docs/api/liquid/objects/discount#discount-title).", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The customer-facing name of the discount.", "name": "code" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> This is the same value as [`discount.code`](/docs/api/liquid/objects/discount#discount-code).", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The customer-facing name of the discount.", "name": "title" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "FixedAmountDiscount", "description": "", "array_value": "" }, { "type": "string", "name": "PercentageDiscount", "description": "", "array_value": "" }, { "type": "string", "name": "ShippingDiscount", "description": "", "array_value": "" } ], "summary": "The type of the discount.", "name": "type" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> This is the same value as [`discount.total_savings`](/docs/api/liquid/objects/discount#discount-total_savings).\nThe value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The amount of the discount as a negative value, in the currency's subunit.", "name": "savings" }, { "deprecated": false, "deprecation_reason": "", "description": "> Note:\n> This is the same value as [`discount.savings`](/docs/api/liquid/objects/discount#discount-savings).\nThe value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted amount.", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The amount of the discount as a negative value, in the currency's subunit.", "name": "total_savings" } ], "summary": "A discount applied to a cart, line item, or order.", "name": "discount", "examples": [], "json_data": { "path": "/", "handle": "customer.orders[2].discounts[0]", "data_from_file": "" }, "return_type": [] }, { "access": { "global": true, "parents": [], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [], "summary": "All of the articles across the blogs in the store.", "name": "articles", "examples": [ { "name": "", "description": "You can use `articles` to access an article by its [handle](/docs/api/liquid/basics#handles).\n", "syntax": "", "path": "/", "raw_liquid": "{% assign article = articles['potion-notions/new-potions-for-spring'] %}\n{{ article.title | link_to: article.url }}", "parameter": false, "display_type": "text", "show_data_tab": true } ], "json_data": { "path": "", "handle": "", "data_from_file": "" }, "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "article" } ] }, { "access": { "global": false, "parents": [ { "object": "articles", "property": "" }, { "object": "blog", "property": "articles" } ], "template": [ "article" ] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "image", "name": "", "description": "", "array_value": "" } ], "summary": "The featured image for the article.", "name": "image" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The full name of the author of the article.", "name": "author" }, { "deprecated": false, "deprecation_reason": "", "description": "> Tip:\n> To learn about how to create metafields, refer to [Create and manage metafields](/apps/metafields/manage) or visit\n> the [Shopify Help Center](https://help.shopify.com/manual/metafields).", "examples": [], "return_type": [ { "type": "untyped", "name": "", "description": "", "array_value": "" } ], "summary": "The [metafields](/docs/api/liquid/objects/metafield) applied to the article.", "name": "metafields" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The [handle](/docs/api/liquid/basics#handles) of the article.", "name": "handle" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The ID of the article.", "name": "id" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The title of the article.", "name": "title" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The relative URL of the article.", "name": "url" }, { "deprecated": false, "deprecation_reason": "", "description": "The name doesn't include the `article.` prefix, or the file extension (`.json` or `.liquid`).\n\n If a custom template isn't assigned to the article, then `nil` is returned.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The name of the [custom template](/themes/architecture/templates#alternate-templates) assigned to the article.", "name": "template_suffix" }, { "deprecated": false, "deprecation_reason": "", "description": "> Tip:\n> Use the [`date` filter](/docs/api/liquid/filters/date) to format the timestamp.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "A timestamp for when the article was created.", "name": "created_at" }, { "deprecated": false, "deprecation_reason": "", "description": "> Tip:\n> Use the [`date` filter](/docs/api/liquid/filters/date) to format the timestamp.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "A timestamp for when the article was published.", "name": "published_at" }, { "deprecated": false, "deprecation_reason": "", "description": "> Tip:\n> Use the [`date` filter](/docs/api/liquid/filters/date) to format the timestamp.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "A timestamp for when the article was updated.", "name": "updated_at" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "boolean", "name": "", "description": "", "array_value": "" } ], "summary": "Returns `true` if the blog that the article belongs to is set to [moderate comments](https://help.shopify.com/manual/online-store/blogs/managing-comments).\nReturns `false` if not.", "name": "moderated?" }, { "deprecated": false, "deprecation_reason": "", "description": "Returns an empty array if comments are disabled.\n\n> Tip:\n> Use the [paginate](/docs/api/liquid/tags/paginate) tag to choose how many comments to show at once, up to a limit of 50.", "examples": [], "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "comment" } ], "summary": "The published comments for the article.", "name": "comments" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The number of published comments for the article.", "name": "comments_count" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "boolean", "name": "", "description": "", "array_value": "" } ], "summary": "Returns `true` if comments are enabled. Returns `false` if not.", "name": "comments_enabled?" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The relative URL where POST requests are sent when creating new comments.", "name": "comment_post_url" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The content of the article.", "name": "content" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The excerpt of the article.", "name": "excerpt" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "Returns the article [excerpt](/docs/api/liquid/objects/article#article-excerpt) if it exists. Returns the article\n[content](/docs/api/liquid/objects/article#article-content) if no excerpt exists.", "name": "excerpt_or_content" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [ { "name": "Show the total tag count", "description": "When looping through `article.tags`, you can print how many times a tag is used with `tag.total_count`. This number shows visitors how many blog posts have been tagged with a particular tag.\n", "syntax": "", "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion", "raw_liquid": "{% for tag in article.tags -%}\n {{ tag }} ({{ tag.total_count }})\n{%- endfor %}", "parameter": false, "display_type": "text", "show_data_tab": true } ], "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "string" } ], "summary": "The tags applied to the article.", "name": "tags" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "user", "name": "", "description": "", "array_value": "" } ], "summary": "The user associated with the author of the article.", "name": "user" } ], "summary": "An article, or [blog post](https://help.shopify.com/manual/online-store/blogs/writing-blogs), in a blog.", "name": "article", "examples": [], "json_data": { "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion", "handle": "article", "data_from_file": "" }, "return_type": [] }, { "access": { "global": false, "parents": [ { "object": "section", "property": "blocks" } ], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "Sections and blocks are reusable modules of content that make up [templates](/themes/architecture/templates).\n\nYou can include a maxiumum of 50 blocks in a section. To learn more about using blocks, refer to the [Building with sections and blocks](/docs/themes/best-practices/templates-sections-blocks).", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The ID of the block.", "name": "id" }, { "deprecated": false, "deprecation_reason": "", "description": "To learn about how to access settings, refer to [Access settings](/themes/architecture/settings#access-settings). To learn which input settings can be applied to the `type` property within settings, refer to [Input settings](/themes/architecture/settings/input-settings).", "examples": [], "return_type": [ { "type": "untyped", "name": "", "description": "", "array_value": "" } ], "summary": "The [settings](/themes/architecture/sections/section-schema#blocks) of the block.", "name": "settings" }, { "deprecated": false, "deprecation_reason": "", "description": "The type is a free-form string that's defined in the [block's schema](/themes/architecture/sections/section-schema#blocks).\nYou can use the type as an identifier. For example, you might display different markup based on the block type.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The type of the block.", "name": "type" }, { "deprecated": false, "deprecation_reason": "", "description": "The theme editor's [JavaScript API](/themes/best-practices/editor/integrate-sections-and-blocks#section-and-block-javascript-events)\nuses the data attributes to identify blocks and listen for events. No value for `block.shopify_attributes` is returned\noutside the theme editor.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The data attributes for the block for use in the theme editor.", "name": "shopify_attributes" } ], "summary": "The content and settings of a [section block](/themes/architecture/sections/section-schema#blocks).", "name": "block", "examples": [], "json_data": { "path": "", "handle": "", "data_from_file": "{\"id\":\"column1\",\"settings\":\"array\",\"shopify_attributes\":\"data-shopify-editor-block=\\\"{\\\"id\\\":\\\"column1\\\",\\\"type\\\":\\\"column\\\"}\\\"\",\"type\":\"column\"}" }, "return_type": [] }, { "access": { "global": true, "parents": [], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [], "summary": "All of the blogs in the store.", "name": "blogs", "examples": [ { "name": "", "description": "You can use `blogs` to access a blog by its [handle](/docs/api/liquid/basics#handles).\n", "syntax": "", "path": "/", "raw_liquid": "{% for article in blogs.potion-notions.articles %}\n {{- article.title | link_to: article.url }}\n{% endfor %}", "parameter": false, "display_type": "text", "show_data_tab": true } ], "json_data": { "path": "", "handle": "", "data_from_file": "" }, "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "blog" } ] }, { "access": { "global": false, "parents": [], "template": [ "blog", "article" ] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The ID of the blog.", "name": "id" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The title of the blog.", "name": "title" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The [handle](/docs/api/liquid/basics#handles) of the blog.", "name": "handle" }, { "deprecated": false, "deprecation_reason": "", "description": "> Tip:\n> Use the [paginate](/docs/api/liquid/tags/paginate) tag to choose how many articles to show per page, up to a limit of 50.", "examples": [], "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "article" } ], "summary": "The articles in the blog.", "name": "articles" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "number", "name": "", "description": "", "array_value": "" } ], "summary": "The total number of articles in the blog. This total doesn't include hidden articles.", "name": "articles_count" }, { "deprecated": false, "deprecation_reason": "", "description": "> Tip:\n> To learn about how to create metafields, refer to [Create and manage metafields](/apps/metafields/manage) or visit\n> the [Shopify Help Center](https://help.shopify.com/manual/metafields).", "examples": [], "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "metafield" } ], "summary": "The [metafields](/docs/api/liquid/objects/metafield) applied to the blog.", "name": "metafields" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The relative URL of the blog.", "name": "url" }, { "deprecated": false, "deprecation_reason": "", "description": "The name doesn't include the `blog.` prefix, or the file extension (`.json` or `.liquid`).\n\n If a custom template isn't assigned to the blog, then `nil` is returned.", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The name of the [custom template](/themes/architecture/templates#alternate-templates) assigned to the blog.", "name": "template_suffix" }, { "deprecated": false, "deprecation_reason": "", "description": "This includes tags of articles that aren't in the current pagination view.", "examples": [], "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "string" } ], "summary": "All of the tags on the articles in the blog.", "name": "all_tags" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "array", "name": "", "description": "", "array_value": "string" } ], "summary": "A list of all of the tags on all of the articles in the blog.\n\nUnlike [`blog.all_tags`](/docs/api/liquid/objects/blog#blog-all_tags), this property only returns tags of articles that are in the\nfiltered view.", "name": "tags" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "boolean", "name": "", "description": "", "array_value": "" } ], "summary": "Returns `true` if comments are enabled for the blog. Returns `false` if not.", "name": "comments_enabled?" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "boolean", "name": "", "description": "", "array_value": "" } ], "summary": "Returns `true` if the blog is set to\n[moderate comments](https://help.shopify.com/manual/online-store/blogs/managing-comments). Returns `false` if not.", "name": "moderated?" }, { "deprecated": false, "deprecation_reason": "", "description": "Returns `nil` if there is no next article.\n\nThis property can be used on the [article page](/themes/architecture/templates/article) to output `next` links.", "examples": [], "return_type": [ { "type": "article", "name": "", "description": "", "array_value": "" } ], "summary": "The next (older) article in the blog.", "name": "next_article" }, { "deprecated": false, "deprecation_reason": "", "description": "Returns `nil` if there is no previous article.\n\nThis property can be used on the [article page](/themes/architecture/templates/article) to output `previous` links.", "examples": [], "return_type": [ { "type": "article", "name": "", "description": "", "array_value": "" } ], "summary": "The previous (newer) article in the blog.", "name": "previous_article" } ], "summary": "Information about a specific [blog](https://help.shopify.com/manual/online-store/blogs/adding-a-blog) in the store.", "name": "blog", "examples": [], "json_data": { "path": "/blogs/potion-notions/new-potions-for-spring", "handle": "blog", "data_from_file": "" }, "return_type": [] }, { "access": { "global": false, "parents": [ { "object": "shop", "property": "brand" } ], "template": [] }, "deprecated": false, "deprecation_reason": "", "description": "", "properties": [ { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "The slogan for the brand.", "name": "slogan" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "string", "name": "", "description": "", "array_value": "" } ], "summary": "A short description of the brand.", "name": "short_description" }, { "deprecated": false, "deprecation_reason": "", "description": "", "examples": [], "return_type": [ { "type": "image", "name": "", "descrip