mur*_*etz 17 microdata schema.org google-rich-snippets
我有一个问题:Google的结构化数据测试工具给了我一个错误:
标签
position不存在.这是必需的.
我将它添加到标记中.比我得到这个错误:
Positionproperty对于类型的对象无效Product
这是我的标记:
<table id="sale_table" itemscope="" itemtype="http://schema.org/ItemList">
<tbody>
<tr itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product">
<td class="sale_art_td" itemprop="productID">10496278</td>
<td class="sale_brand_td" itemprop="brand"><span itemprop="name ">--</span></td>
<td class="sale_name_td" itemprop="name">10496278 / ?????? ????????? Daewoo Nexia,Espero DD</td>
<td class="sale_am_td">1.00</td>
<td class="sale_price_td" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="RUR"><span itemprop="price">341.50</span></td>
<td class="sale_buy_td"><a href="javascript:void(0);" class="sale_buy_link" data-id="63455914" data-query="10496278">??????</a><!--<img src="/upload/badge/sale_cart.png" />--></td>
<td class="hidden">
<meta itemprop="url" content="/partsearch/?q=10496278">
<span itemprop="description">??????????: 10496278 / ?????? ????????? Daewoo Nexia,Espero DD ?? ???? 341.50</span>
</td>
</tr>
<tr itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product">
<td class="sale_art_td" itemprop="productID">76202sx0a12</td>
<td class="sale_brand_td" itemprop="brand"><span itemprop="name ">HONDA</span></td>
<td class="sale_name_td" itemprop="name">76202SX0A12</td>
<td class="sale_am_td">1.00</td>
<td class="sale_price_td" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="RUR"><span itemprop="price">704.00</span></td>
<td class="sale_buy_td"><a href="javascript:void(0);" class="sale_buy_link" data-id="63456060" data-query="76202sx0a12">??????</a><!--<img src="/upload/badge/sale_cart.png" />--></td>
<td class="hidden">
<meta itemprop="url" content="/partsearch/?q=76202sx0a12">
<span itemprop="description">??????????: 76202SX0A12 ?? ???? 704.00</span>
</td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
这不是您的代码错误。这只是意味着,除非您提供此属性,否则Google不会显示某些Rich Snippet(或类似功能)。
但是,没有为type定义position属性,因此这没有任何意义。Product
似乎这是Google的一项新的结构化数据功能,由于链接到404页:列表页轮播,因此尚未记录。也许这是一项正在进行的工作,他们并不打算在其“测试工具”中发布支票。
因此,我暂时将其忽略。
根据我的测试,malefique 找到了正确的解决方案。
此代码使用结构化数据测试工具进行了完全验证:
{
"@context": "http://schema.org",
"@type": "ItemList",
"itemListOrder": "http://schema.org/ItemListOrderDescending",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@type": "Product",
"name": "My product",
"url": "www.example.com",
"offers": {
"@type": "Offer",
"availability": "http://schema.org/InStock",
"price": "100.00",
"priceCurrency": "AUD"
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11108 次 |
| 最近记录: |