做外贸有哪些网站,网站分为几部分,如何做网站内容构架图,xampp 搭建 wordpress目录 解释
操作
1、添加Custom data
2、选择特定类型的数据
3、为Page配置元子段和值
4、模板访问 解释
Shopify Metafields 是一种用于存储和管理自定义数据的功能。它们允许商户在商城中的产品、订单、客户、Page等对象上添加自定义字段#xff0c;以满足特定业务需求…目录 解释
操作
1、添加Custom data
2、选择特定类型的数据
3、为Page配置元子段和值
4、模板访问 解释
Shopify Metafields 是一种用于存储和管理自定义数据的功能。它们允许商户在商城中的产品、订单、客户、Page等对象上添加自定义字段以满足特定业务需求。
操作
1、添加Custom data 可以为Products、Pages添加自定义数据比如选择了Pages那么在任何Page模板下配置了metafield的值可以用page.metafields.namespace.key.value访问添加的特定类型的元字段内容又比如选择了Products那么在product模板下可以用product.metafields.namespace.key.value访问为产品添加的特定数据的元字段内容Collections同上其它的比如Orders也有特定的用法。
就拿pages做举例
2、选择特定类型的数据 为Pages添加自定义内容的数据type可以有普通数据type文本、日期、布尔、json、整数等也可以有引用数据typeproduct、file、collection、page等。 3、为Page配置元子段和值
选择一个页面 show all 配置元字段值 4、模板访问
在page.xxx.json通过.value访问元字段内容
基本元子段type typeliquid codevalueSingle line text{{ page.metafields.custom.single_line_text.value }}single line text aaaaaSingle line text (List){{ page.metafields.custom.list_single_line_text.value }} some radom text1 some radom text2 some radom text3 integer{{ page.metafields.custom.integer.value }}10true of false{{ page.metafields.custom.boolean.value }}truejson{{ page.metafields.custom.json.value }} {namesa}date{{ page.metafields.custom.date.value }}2023-12-06money{{ page.metafields.custom.money.value }}2300Multi-line text {{ page.metafields.custom.multi_line_text.value }}line text 1 line text 2 line text 3
循环Single line text (List)
{% assign list_line_text page.metafields.custom.list_single_line_text.value %}
{% for line_text in list_line_text %}{{ line_text }}{% endfor %}
引用元子段type
typeliquid codevalueproduct{{ page.metafields.custom.product.value }}ProductDroplist product{{ page.metafields.custom.list_product.value }}ProductListDropcollection{{ page.metafields.custom.collection.value }}CollectionDropmetaobjects{{ page.metafields.custom.metaobjects.value }}MetaobjectDropfile{{ page.metafields.custom.file.value }} files/app-screen-3.png
访问product
{% assign product_value page.metafields.custom.product.value %}
{{ product_value.title }}
{{ product_value.price | money}}
{{ product_value.featured_image | image_url: width: 100 | image_tag }}
{{ product_value.url | link_to: product_value.url }}
访问list product
{% assign list_product page.metafields.custom.list_product.value %}
{% for product_item in list_product %}{{ product_item.title }}{{ product_item.featured_image | image_url: width: 100 | image_tag }}{{ product_item.price | money }}{{ product_item.url | link_to: product_item.url }}
{% endfor %}
访问collection
{% assign collection_value page.metafields.custom.collection.value %}
{{ collection_value.title }}
{{ collection_value.url | link_to: collection.url }}
访问metaobjects
{% assign metaObject page.metafields.custom.metaobjects.value %}
{{ metaObject.name }}
{{ metaObject.gender }}
访问file
{% assign file page.metafields.custom.file.value %}
{{ file | image_url: width: 100 | image_tag }}
5、内嵌式app管理元字段
Metafields Guru