Schema.org WebPage - isPartOf?

I'm trying to figure out how to use the isPartOf attribute in the Schema.org WebPage object.

From what I understand, this should be used to specify that your page is part of a collection. So so I have a list of hockey teams and then a list of players. My understanding is that an individual player would be a part of the team, so presumably on the players HTML page, I would add the isPartOf element.

But I'm not sure how I would add this. Should I add it as a URL to the pages collection? Or should I just add a meta tag with the collections name? I can't seem to find much about this element anywhere. Does anyone know how to properly use it?

2 Answers

I think you're right: use isPartOf to indicate the parent collection (team, in this case) to which a page or file (player) belongs.

So on the player's page:

<a href="/toronto-maple-leafs/" itemprop="isPartOf">Member of the Toronto Maple Leafs</a>

And on the team page, ensure that it's marked with CollectionPage, for example:

<body itemscope itemtype="">

The isPartOf property (and its inverse property: hasPart) can be used to convey that a CreativeWork is part of another CreativeWork. One use case is a category page (example).

While a URL value could be used, the expected way is to provide CreativeWork values (WebPage is a more specific CreativeWork):

<div itemscope itemtype=""> <h1 itemprop="name">Child page</h1> <p itemprop="isPartOf" itemscope itemtype=""> <span itemprop="name">Parent page</span> </p> </div> 
<div itemscope itemtype=""> <h1 itemprop="name">Parent page</h1> <p itemprop="hasPart" itemscope itemtype=""> <span itemprop="name">Child page</span> </p> </div> 

For a sports team

However, if you want to convey that a player is part of a team, you can’t use isPartOf/hasPart, as players and teams aren’t creative works. You would need a suitable property that can connect Person and Organization items.

Schema.org has suitable types and properties for this case now:

  • SportsTeam

    Organization: Sports team.

  • athlete

    A person that acts as performing member of a sports team; a player as opposed to a coach.

Example:

<div itemscope itemtype=""> <ul> <li itemprop="athlete" itemscope itemtype=""></li> <li itemprop="athlete" itemscope itemtype=""></li> <li itemprop="athlete" itemscope itemtype=""></li> </ul> </div> 

The athlete property has no inverse property defined. If you want to specify this relation within a Person item, you could either use the non-standard itemprop-reverse attribute (example), or switch from using Microdata to RDFa (example) or JSON-LD (example).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like