我有以下具有Product
模式和Review
模式的HTML,但是由于某种原因,我的Product
和Review
在结构数据测试工具在我的Product
模式上显示以下警告:
推荐查看字段。请提供一个值(如果有)。
这正常吗?
<main class="container" itemscope="" itemtype="http://schema.org/Product">
<meta itemprop="brand" content="Ticketstoday">
<div class="section position-relative">
<div class="row">
<div class="col s12 l8">
<div class="card-panel white description">
<h1 itemprop="name"></h1>
<h6 class="grey-text text-darken-1"></h6>
<span itemprop="description">
</span>
</div>
</div>
</div>
<div class="row">
<div class="col s12 l8">
<div class="card-panel white description">
<h2>Reviews</h2>
<div itemprop="aggregateRating" itemscope="" itemtype="https://schema.org/AggregateRating">
<h6 class="grey-text text-darken-1">
Rated <span itemprop="ratingValue">4.3</span> out of <span itemprop="bestRating">5</span> (<span itemprop="ratingCount">55</span> Reviews)
</h6>
</div>
<ul class="collection reviews">
<li class="collection-item avatar" itemscope="" itemtype="http://schema.org/Review">
<meta itemprop="itemReviewed" itemscope="" itemtype="http://schema.org/Thing">
<meta itemprop="url" content="http://ticketstoday.local/play/all-about-eve">
<span itemprop="reviewRating" itemscope="" itemtype="http://schema.org/Rating">
<meta itemprop="ratingValue" content="5">
</span>
<span itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Ticketstoday">
</span>
<img id="review-avatar" src="http://ticketstoday.local//images/avatar.svg" alt="" class="circle">
<div itemprop="author" itemscope="" itemtype="https://schema.org/Person">
<span class="title" itemprop="name">Ms. A Gunn</span>
</div>
<span class="grey-text text-darken-1">Feb 3, 2019</span>
<div>
<span class="stars" data-rating="5" data-num-stars="5"><i class="material-icons">star</i><i class="material-icons">star</i><i class="material-icons">star</i><i class="material-icons">star</i><i class="material-icons">star</i></span>
</div>
<p itemprop="reviewBody">Test Review</p>
</li>
</ul>
</div>
</div>
</div>
</div>
</main>
答案 0 :(得分:2)
您可以使用review
属性将Review
添加到Product
:
<li itemprop="review" itemscope itemtype="http://schema.org/Review">
如果执行此操作,则无需提供itemReviewed
属性。
答案 1 :(得分:1)
元素:
<li class="collection-item avatar" itemscope="" itemtype="http://schema.org/Review">
缺少itemprop属性,应该是
<li class="collection-item avatar" itemprop="review" itemscope="" itemtype="http://schema.org/Review">
在这种情况下。
答案 2 :(得分:0)
现在检查它,您将了解它的工作原理。
<div itemprop="review" itemtype="http://schema.org/Review" itemscope>
<div itemprop="author" itemtype="http://schema.org/Person" itemscope>
<meta itemprop="name" content="Author Name" /> //just for example, you will place your own author name here.
</div>