: Linking a Product and an AggregateRating to a Brand (itemref) I have a Brand and a Product, I am associating the Product to the Brand like this: <h1 itemprop="brand" itemscope itemtype="http://schema.org/Brand"
I have a Brand and a Product, I am associating the Product to the Brand like this:
<h1 itemprop="brand" itemscope itemtype="http://schema.org/Brand" id="v1437">
<span itemprop="name">MyBrand</span>
<link itemprop="url" href="http://www.example.com/MyBrand"/>
<link itemprop="logo" href="http://www.example.com/MyBrand/logo.png"/>
</h1>
<div itemscope itemtype="http://schema.org/Product" itemref="v1437">
<span itemprop="name">MyProduct</span>
</div>
I would like to create an AggregateRating associated to the Brand, like the following:
<div itemprop="aggregateRating" itemscope
itemtype="http://schema.org/AggregateRating"
itemref="v1437">
<meta itemprop="ratingValue" content="4.24"/>
<meta itemprop="ratingCount" content="17"/>
</div>
The AggregateRating needs an itemReviewed field, pointing to the Brand, I can add an itemReviewed attribute inside my Brand:
<h1 itemprop="brand itemReviewed" itemscope
itemtype="http://schema.org/Brand" id="v1437">
But the validator displays some conflicts:
Is there another way to achieve this without having to duplicate the Brand?
EDIT: Referring to Evgeniy's answer, I can't embed an item into another, itemref seems to be the only option available.
More posts by @Connie744
1 Comments
Sorted by latest first Latest Oldest Best
This code will do the job, and is errorfree validated:
<div itemscope itemtype="http://schema.org/Product"
itemref="v1437">
<span itemprop="name">MyProduct</span>
</div>
<div itemprop="brand" itemscope itemtype="http://schema.org/Brand"
id="v1437" itemref="p1437">
<h1 itemprop="name">MyBrand</h1>
<link itemprop="url" href="http://www.example.com/MyBrand"/>
<link itemprop="logo" href="http://www.example.com/MyBrand/logo.png"/>
</div>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"
id="p1437">
<meta itemprop="ratingValue" content="4.24"/>
<meta itemprop="ratingCount" content="17"/>
</div>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.