---
title: "sections"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/sline/tag/sections'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/sline/tag/sections.md'
---

# sections


    渲染组件集。其中的组件只允许在 `layout` 类型的模板中使用。

    



```sline
{{#sections "file_name" /}}
```





    
## 必选参数

        
             `file_name` `string`：组件集名称，对应 `sections` 目录下的 `.json` 文件。例如，要渲染默认组件集 `sections/header.json`，语法示例中的 `file_name` 需替换为 `header`。
        
    





    
## 例子

        
            

            若要渲染 header 组件集，输入以下代码。

            
```sline
{{#sections "header" /}}
```
            

            
        
    
