首页 > 解决方案 > 如何将页面标题分离到它自己的 Liquid/shopify 组件中?

问题描述

我想为英雄创建一个组件/部分,page.title 我已将其分成以下部分。

  <div class="contain--small">
    <h1 class="h1 hero__title text--center">{{ page.title }}</h1>
  </div>
</div>

然后像这样将它包含在我的页面中

{% section 'hero' %}

我在页面上看不到页面标题 - 该组件已包含在内,当我检查 CMS 时,我可以在 src 中看到它。我在这里想念什么?道具需要传入还是什么的?我怎样才能做到这一点?

标签: shopifyliquid

解决方案


推荐阅读