2016-05-26 41 views

回答

1

不,沒有辦法爲微數據屬性設置站點範圍的默認值。

如果單個頁面包含多個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> 
+0

謝謝!很好的答案! – Ben