html - Shopify:如果我的收藏成块,如何获取收藏网址
问题描述
我需要从内部有集合的所有块中获取所有 url:我已经尝试过了,但它没有显示任何内容:
{% for block in section.blocks %}
<li class="best-seller-header__tag">{{block.settings.collection_id.url}}</li>
{% endfor %}
这是我的架构,它似乎是正确的:
{% schema %}
{
"name": "Best Seller Section",
"tag": "section",
"class": "best-seller",
"max_blocks": 5,
"blocks": [
{
"name": "collection",
"type": "text",
"settings": [
{
"type": "collection",
"id": "collection_id",
"label": "Choose collection to show in Best Selling:"
}
]
}
{% endschema %}
解决方案
推荐阅读
- amazon-web-services - 如何加密用于托管静态网页的现有 AWS S3 存储桶?
- php - 验证所有支架都正确打开/关闭
- python - 如果文件在 Pytest 中不存在,如何断言?
- r - 如何在 R 中查看 ggplot 变量的代码?
- javascript - 控制台记录字体错误 node.js
- pytest - 如何模拟 sqlalchemy.engine.cursor.LegacyCursorResult?
- android - 有没有办法使用需要 google services 4.3.6 来解决当前问题的实时数据库?
- haskell - 如何在不导入模块 Data.Char 的情况下在 Haskell 中使用 toUpper 和 toLower?
- quarkus - 在 REST 端点上使用 @Retry 和 @Transactional
- azure - 使用 Azure 数据块从 FileServer 上传到 Azure 存储容器