shopify - 如何将页面标题分离到它自己的 Liquid/shopify 组件中?
问题描述
我想为英雄创建一个组件/部分,page.title
我已将其分成以下部分。
<div class="contain--small">
<h1 class="h1 hero__title text--center">{{ page.title }}</h1>
</div>
</div>
然后像这样将它包含在我的页面中
{% section 'hero' %}
我在页面上看不到页面标题 - 该组件已包含在内,当我检查 CMS 时,我可以在 src 中看到它。我在这里想念什么?道具需要传入还是什么的?我怎样才能做到这一点?
解决方案
推荐阅读
- kubernetes - 如何从 YAML 文件的命令部分读取环境变量?(在 Kubernetes 中)
- python - 从数组中分离数据的最佳方法是什么以及如何同步数组?
- sql - 使用窗口函数组合 2 个查询
- kotlin - 将类对象传递给函数(Kotlin)
- github - 在 github-pages 上的博客文章中添加评论
- javascript - 如果 url 的参数发生变化,则重新加载/重新渲染页面 - 反应
- python - 乌龟的python子类
- java - 我需要安装任何 spring 插件、IDE 或工具套件吗?
- python - python PIL draw.text
- java - 如何获取Stream中元素的索引?