shopify添加多图上传
Add multiple image upload in shopify
我是 shopify 新手。谁能帮我在 settings_schema.json
中添加自定义多图上传部分
这是我的代码 -
{
"name": "Banner",
"settings": [
{
"type": "header",
"content": "Image Options"
},
{
"type": "checkbox",
"id": "use_img",
"label": "Use Custom Banner?"
},
{
"type": "image",
"id": "start_page_bg.jpg",
"label": "Custom Banner",
"max-width": 1200,
"max-height": 1200
},
{
"type": "paragraph",
"content": "Recommend the optimal width and height for your banner here."
}
]
}
那是针对单张图片上传的。我想为横幅上传多张图片
Shopify 目前没有乘法字段选项。
最近 Shopify 添加了一个 Sections 选项,其中有一个用于多张图片的选项,但这仅适用于主页(或包含 content_for_index
标签的位置)。
有几种方法可以解决此问题:
1) 用 id 的 image_1.jpg、image_2.jpg、image_3.jpg 等创建乘法字段,并用 for 循环循环它们。但它们需要始终在设置页面中可见。
2) 创建一个导航字段并创建一个带有网址类型链接的导航,其中网址将指向图像。您将循环该导航的链接并将它们用作图像。
3) 创建一个博客字段并创建一个单独的博客,您可以在其中使用该博客创建 post,其中每个 post 都可以使用特色图片。您将从该类别循环 post,然后您将有权访问图像。
我是 shopify 新手。谁能帮我在 settings_schema.json
中添加自定义多图上传部分这是我的代码 -
{
"name": "Banner",
"settings": [
{
"type": "header",
"content": "Image Options"
},
{
"type": "checkbox",
"id": "use_img",
"label": "Use Custom Banner?"
},
{
"type": "image",
"id": "start_page_bg.jpg",
"label": "Custom Banner",
"max-width": 1200,
"max-height": 1200
},
{
"type": "paragraph",
"content": "Recommend the optimal width and height for your banner here."
}
]
}
那是针对单张图片上传的。我想为横幅上传多张图片
Shopify 目前没有乘法字段选项。
最近 Shopify 添加了一个 Sections 选项,其中有一个用于多张图片的选项,但这仅适用于主页(或包含 content_for_index
标签的位置)。
有几种方法可以解决此问题:
1) 用 id 的 image_1.jpg、image_2.jpg、image_3.jpg 等创建乘法字段,并用 for 循环循环它们。但它们需要始终在设置页面中可见。
2) 创建一个导航字段并创建一个带有网址类型链接的导航,其中网址将指向图像。您将循环该导航的链接并将它们用作图像。
3) 创建一个博客字段并创建一个单独的博客,您可以在其中使用该博客创建 post,其中每个 post 都可以使用特色图片。您将从该类别循环 post,然后您将有权访问图像。