1
我有一個網站有很多優惠使用Schema.org Offer
類型。設置一般Schema.org提供的貨幣值Microdata
我能以某種方式設置我網站上所有優惠價格的貨幣嗎?或者我必須爲其中的每一個設置itemprop="priceCurrency"
?
我有一個網站有很多優惠使用Schema.org Offer
類型。設置一般Schema.org提供的貨幣值Microdata
我能以某種方式設置我網站上所有優惠價格的貨幣嗎?或者我必須爲其中的每一個設置itemprop="priceCurrency"
?
不,沒有辦法爲微數據屬性設置站點範圍的默認值。
如果單個頁面包含多個Offer
項目,則可以使用Microdata的itemref
屬性(請參見下面的示例)。但這不適用於各個頁面。
<head>
<title>A page with two offers</title>
<meta id="site-currency" itemprop="priceCurrency" content="EUR" />
<!-- this 'meta' element can also be part of the 'body' element -->
</head>
<body>
<div itemscope itemtype="http://schema.org/Offer" itemref="site-currency">
</div>
<div itemscope itemtype="http://schema.org/Offer" itemref="site-currency">
</div>
</body>
謝謝!很好的答案! – Ben