# content_for_layout

> content_for_layout Liquid 对象：渲染当前 template 的内容，必须放在主题 layout 文件的 body 标签内。

根据当前 [template](/docs/theme/architecture/templates/overview) 动态返回内容。

请将 `content_for_layout` object 包含在 [layout 文件](/docs/theme/architecture/layouts/overview)的 `<body>` 和 `</body>` HTML 标签之间。

:::note
`content_for_layout` object 在 `theme.liquid` 中为必填项。
:::

```liquid title="theme.liquid"
<!DOCTYPE html>
<html>
  <head>
  	<!-- ... -->
  	{{ content_for_header }}
  </head>
  <body>
    <!-- ... -->
    {{ content_for_layout }}
    <!-- ... -->
  </body>
</html>
```
