我正在尝试创建一个模式,用于几个表,这些表使用基于高度,体积,宽度等排列的产品列表(例如瓶子)。
我试过这个Microdata:
<div itemscope itemtype="http://schema.org/ItemList" id="id1">
<ul>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<meta itemprop="position" content="1" />
<span itemprop="item" itemscope itemtype="http://schema.org/Thing">
<span itemprop="name" class="name">Coke Bottle</span>
<span class="measure">
<span itemscope itemtype="http://schema.org/QuantitativeValue">
<span itemprop="value">2359</span>
<span itemprop="unitText">mm</span>
<meta itemprop="unitCode" content="MMT" />
</span> /
<span itemscope itemtype="http://schema.org/QuantitativeValue">
<span itemprop="value">92.52</span>
<span itemprop="unitText">in</span>
<meta itemprop="unitCode" content="INH" />
</span>
</span>
</span>
</li>
</ul>
</div>
问题是该措施与产品没有直接关联。
如何使用Microdata构建此数据以使用QuantitativeValue
维护测量值并使ItemList
适合我的需要?
这些只是表格,显示按这些值按升序或降序排序的产品名称列表,它们不用于导航,只是根据汇总数据显示信息。
在你的帖子中,我看到以下矛盾:
问题是该措施与产品没有直接关联。
和
这些只是显示产品名称列表的表格
但是,如果这是一个产品,您可以使用以下列表的有效标记:
<div itemscope itemtype="https://schema.org/ItemList" id="id1">
<ul>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<meta itemprop="position" content="1" />
<span itemprop="item" itemscope itemtype="https://schema.org/Product">
<a itemprop="url" href=example.com/list.html#cokebottle><span itemprop="name" class="name">Coke Bottle</span></a>
<span class="measure" itemprop="additionalProperty" itemscope itemtype="https://schema.org/PropertyValue">
<span itemprop="value">2359</span>
<span itemprop="unitText">mm</span>
<meta itemprop="unitCode" content="MMT" />
<meta itemprop="propertyID" content="http://www.unece.org/fileadmin/DAM/cefact/recommendations/bkup_htm/add3lm.htm" /> /
<span itemprop="value">92.52</span>
<span itemprop="unitText">in</span>
<meta itemprop="unitCode" content="INH" />
<meta itemprop="propertyID" content="http://www.unece.org/fileadmin/DAM/cefact/recommendations/bkup_htm/add3hk.htm" />
</span>
</span>
</li>
</ul>
</div>
在这里我们使用guide of Google for Single, all-in-one-page list:
单个,一页一页的列表包含所有列表信息,包括每个项目的全文:例如,各种松饼的配方库,全部包含在一个页面上。
请注意,此标记的引用必须具有相同的URL,但不同的锚点(例如上例中的#cokebottle)。所以它应该是一个网页上安装的所有部分(以及这些部分的链接)的列表。
这里我们还使用类型PropertyValue作为属性additionalProperty中嵌入的。此属性是Product类型的一部分,因此所有标记都是特定产品的语义关系和描述。
另请注意,这里我们使用属性propertyID和URL作为此属性值的标识符。
你无法将qazxsw poi与qazxsw poi联系起来。
最佳做法是使用最具体的类型。在你的情况下,这将是QuantitativeValue
,或其子类型之一,如果它适用(Thing
,Product
或IndividualProduct
)。
这允许您使用属性ProductModel
,SomeProducts
,depth
和height
,所有这些都可以采用weight
值。