Edit this code so the name of my section in theme editor is the title

Topic summary

Main issue: Make a Shopify theme editor section’s displayed name match a user-entered Title setting.

Key details from code: A section schema defines a static “name” (Collapsible Page) and settings including a text field with id “title” and a “page” selector. This JSON schema controls how the section appears in the theme editor.

Answer/Update: The section name cannot be dynamic; Shopify only supports a static section “name” in the schema. However, block names within a section can reflect a block’s Title setting if that setting uses the id “title”.

Actionable guidance: Use a block with a setting whose id is “title” to have the block’s label in the editor update based on the Title value. The section’s label itself must remain static.

Outcome: Resolution provided; section name cannot be changed dynamically, but a block-level workaround is available.

Notes: The provided code snippet is central to understanding the schema and limitations. Terms: “Section schema” is the JSON config for a section; “block” is a configurable subcomponent within a section.

Summarized with AI on February 7. AI used: gpt-5.
{% schema %}
{
   "name":"Collapsible Page",
   "class":"shopify-section",
   "settings":[
      {
         "type":"header",
         "content":"Collapsible Content"
      },
      {
         "type":"text",
         "id":"title",
         "label":"Title"
      },
      {
        "id": "page",
        "type": "page",
        "label": "Page"
      }          
   ],
   "presets":[
      {
         "category":"Advanced",
         "name":"Collapsible Page",
         "settings":{
            
         }
      }
   ]
}
{% endschema %}
1 Like

Hi @DavidCab

The section name settings cannot be dynamic. However, the name of the block can be change depending on title block. You just have to have the ID title