Content sections

Content sections are customizable page elements, such as a slideshow or gallery, which can be added to the pages of an online store. These section files are located in the content/ directory of themes.

Content sections can be added to master pages and pages using the sections architecture through the Online Store editor. The Online Store editor can also be used to adjust the position of content sections.

Content sections are not standardized and are optional to be implemented by the theme. However, for a theme to be able to render content sections added to an online store with a different theme, it must have at least one content section accepting all content types.

Rules for content sections

  • Content sections must define a name in their schema.

  • Content sections must follow the rules of the Content Schema through their content property.

  • Within the schema tags, content sections can define all the properties of theme sections except for default, blocks, and max_blocks.

  • A maximum of 10 settings for each section, static content, or block content can be defined in the section schema.

  • Content sections can't be included in Liquid files through the {% section %} Liquid tag or added to content_for_index.

  • The deprecated {% include %} Liquid tag is not supported in content sections.

  • Content sections don't support the {% javascript %} and {% stylesheet %} tags.

The content schema property

Content sections are required to define a content property in their schema. The content property is a new method for defining settings and blocks which replaces the blocks property, and in part the settings property, in content sections. It supports a range of standardized values for the different types of section content, allowing content made with a section of one theme to be rendered by a section of a different theme.

Learn more about the content property in the Content Schema documentation.

The supports schema property

The supports schema property defines which types of page or master page the content section can be added to. If a supports field is not defined, the section can be added to all pages and master pages.

This example demonstrates a section that can be added only to product and collection pages:

{% schema %}
    "supports": ["product", "collection"]
{% endschema %}

The section Liquid object

The section Liquid object of content sections has an additional content property. More information in the Content Schema documention.