在单个页面上包含多个产品的多个类别

时间:2019-08-27 08:27:15

标签: schema

我的目标是基于this正确输出JSON-D。问题在于该网站具有多个类别,这些类别在一个页面上包含多个产品。该网站的结构如下:

Amarelo K

  • Amarelo K 101
  • Amarelo K 102
  • Amerelo K 103

Amarelo D

  • Amarelo D 101
  • Amarelo D 102
  • Amerelo D 103

Amarelo C

  • Amarelo C 101
  • Amarelo C 102
  • Amerelo C 103

我认为我可以使用这样的东西

{
  "@context": "http://schema.org",
  "@type": "CollectionPage",
  "mainEntity": {
    "@type": "ItemList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": "1",
        "name": "Amarelo C",
        "item": {
          "@type": "ItemList",
          "itemListElement": [
            {
              "@type": "Product",
              "name": "Amarelo C 101",
              "image": ["LinkToTheProduct101Img"],
              "url": "LinkToTheProduct#101"
            },
            {
              "@type": "Product",
              "name": "Amarelo C 102",
              "image": ["LinkToTheProduct102Img"],
              "url": "LinkToTheProduct#102"
            },
            {
              "@type": "Product",
              "name": "Amarelo C 103",
              "image": ["LinkToTheProduct103Img"],
              "url": "LinkToTheProduct#103"
            }
          ]
        }
      },
      {
        "@type": "ListItem",
        "position": "2",
        "name": "Amarelo D",
        "item": {
          "@type": "ItemList",
          "itemListElement": [
            {
              "@type": "Product",
              "name": "Amarelo D 101",
              "image": ["LinkToTheProduct101Img"],
              "url": "LinkToTheProduct#101"
            },
            {
              "@type": "Product",
              "name": "Amarelo D 102",
              "image": ["LinkToTheProduct102Img"],
              "url": "LinkToTheProduct#102"
            },
            {
              "@type": "Product",
              "name": "Amarelo D 103",
              "image": ["LinkToTheProduct103Img"],
              "url": "LinkToTheProduct#103"
            }
          ]
        }
      },
      {
        "@type": "ListItem",
        "position": "3",
        "name": "Amarelo C",
        "item": {
          "@type": "ItemList",
          "itemListElement": [
            {
              "@type": "Product",
              "name": "Amarelo C 101",
              "image": ["LinkToTheProduct101Img"],
              "url": "LinkToTheProduct#101"
            },
            {
              "@type": "Product",
              "name": "Amarelo C 102",
              "image": ["LinkToTheProduct102Img"],
              "url": "LinkToTheProduct#102"
            },
            {
              "@type": "Product",
              "name": "Amarelo C 103",
              "image": ["LinkToTheProduct103Img"],
              "url": "LinkToTheProduct#103"
            }
          ]
        }
      }
    ]
  }
}

它甚至成功通过了Google Structured Data Testing Tool,但我想知道我是否没有错过任何事情...

0 个答案:

没有答案
相关问题