7

我需要一些帮助才能将一些丰富的片段添加到我的网站

我按照http://schema.org/docs/gs.html#advanced_missing上在 schema.org 上给出的说明插入了评论微数据,使用星形图像进行评分,使用文本进行评论计数,但使用测试工具对其进行测试它什么也没显示。 我们使用微数据进行评论的示例页面

这是我用过的

<div itemprop="reviews" itemscope itemtype="http://schema.org/AggregateRating">
  <A HREF="javascript:an();"><img src="/images/stars/4.5.gif" border=0></a>
  <meta itemprop="ratingValue" content="4.5" /> 
  <meta itemprop="bestRating" content="5" />
  <BR>
  <span class="bottomnavfooter">
    <A HREF="javascript:an();">Read (<span itemprop="ratingCount">70</span>) Reviews</A 
  </span>
</div>

然后,我创建了一个静态测试页面,并使用 Google 在此处http://www.google.com/support/webmasters/bin/answer.py?answer=172705提供的说明进行了一些更改(这与我在架构上找到的不同。 org!!)但测试仍然只返回产品名称而不是价格或评论。

这是我的测试页面- 你能看看我哪里出错了吗

非常感谢!!

4

1 回答 1

9

The above code snippet will fail because it has an itemprop for aggregateRating, but isn't enclosed in an itemscope. It also doesn't help that your final anchor close tag is missing a >, but I guess that was just an accident when you were copying the code into SO.

The other problem mainly brought about because the example on the schema.org site is wrong (I have filed a bug report on this). They mention itemprop="reviews" instead of itemprop="aggregateRating". The code should look more like the following:

<div itemscope itemtype="http://schema.org/Offer">
  <span itemprop="name">Ray-Ban 2132 New Wayfarer Sunglasses</span>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <a href="javascript:an();"><img src="/images/stars/4.5.gif" border=0></a>
    <meta itemprop="ratingValue" content="4.5" /> 
    <meta itemprop="bestRating" content="5" /> 
    <br />
    <span class="bottomnavfooter">
      <a href="javascript:an();">Read (<span itemprop="ratingCount">70</span>) Reviews</a>
     </span>
  </div>
</div>
于 2011-11-22T07:15:40.870 回答