English 中文(简体)
在使用Xhtml页的扫描标记和评论时,没有显示星号和总合的评级。
原标题:Stars and aggregated rating are not shown when using schema.org markup and and Review in xhtml page

I m trying to implement schema.org s microData format in my xhtml template. Since I m using xhtml templates, I needed to add

<div itemprop="reviews" itemscope="itemscope" itemtype="http://schema.org/Review">

而不是:

<div itemprop="reviews" itemscope itemtype="http://schema.org/Review">

否则,我的模板就没有改动。 我找到了here

我的赞扬是:

<div itemscope="itemscope" itemtype="http://schema.org/Place">

                        <div itemprop="aggregateRating" itemscope="itemscope"
                             itemtype="http://schema.org/AggregateRating">
                            <span itemprop="ratingValue">#{company.meanRating}</span> stars -
                            based on <span itemprop="reviewCount">#{company.confirmedReviewCount}</span> reviews
                        </div>

                        <ui:repeat var="review" value="#{company.reverseConfirmedReviews}">

                            <div itemprop="reviews" itemscope="itemscope" itemtype="http://schema.org/Review">
                                <span itemprop="name">Not a happy camper</span> -
                                by <span itemprop="author">#{review.reviewer.firstName}</span>,
                                <div itemprop="reviewRating" itemscope="itemscope" itemtype="http://schema.org/Rating">
                                    <span itemprop="ratingValue">1</span>/
                                    <span itemprop="bestRating">5</span>stars
                                </div>
                                <span itemprop="description">#{review.text} </span>
                            </div>

                        </ui:repeat>
                    </div>

http://www.google.com/webmasters/tools/richsnippets” rel=“nofollow”http://www.google.com/webmasters/tools/richsnippets

我在这里做了什么错误?

最佳回答

Yes!! The problem actually consisted of two errors, first somebody had named the div class to "hReview-aggregate" which is appropriate when you implement Microformats not Microdata

The second error was that I misunderstood the specification of schema.org. This is how I end up doing:

           <div class="box bigBox" itemscope="itemscope" itemtype="http://schema.org/LocalBusiness">
               <span itemprop="name">#{viewCompany.name}</span>
                <div class="subLeftColumn" style="margin-top:10px;" itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">        
                    <div class="num">
                        <span class="rating" id="companyRating" itemprop="ratingValue">#{rating}</span>
                    </div>
                    <div>Grade</div>
                    <div class="num">
                         <span class="count" id="companyCount" itemprop="reviewCount">
                              #{confirmedReviewCount}
                         </span>
                    </div>
                </div>
            </div>

希望!

问题回答

• 检查假日 是如何为这一尿液做的:www.holidayiq.com/destinations/Lonavala-Overview.html

http://www.google.com

这些关键词“罗纳瓦拉角 attract”和你将看到同样的幻灯,它们利用微观数据在刀子中进行这种审查,使用了“五”类:审查-汇总”和更多的标签,对它进行了研究,在零敲碎打的工作中完成了审查。





相关问题
Is this syntatically valid for div?

<div class= clear ></div> /*which comes out to be below one in FF (seen via firebug) */ <div class= clear /> /*is this the last empty div declaration is semantically valid ? */

How to apply pagination in IFrame

I have an IFrame with a Table enclosed within it. I want to display 15 rows of a table and than a Next button must be there to move forward. How to apply pagination for IFrame?

Scala and HTML parsing

How do you load an HTML DOM document into Scala? The XML singleton had errors when trying to load the xmlns tags. import java.net._ import java.io._ import scala.xml._ object NetParse { import ...

热门标签