Multiple Schema.org Instances on One Page

Tutorial

A common structured data design pattern is a list of things on a website. Commonly we see lists of videos, products, people and companies. There are several options to create the markup for these lists. Below we’ll look at some common solutions.

Schema.org CollectionPage

Usage: Between 50,000 and 100,000 domains

This is a more specialized, subclass of, Webpage. There aren’t any unique properties that make it a CollectionPage to help us define this collection to its items. There are two properties we could use, schema.org/hasPart and schema.org/about.  Let’s look at hasPart first, it expects a value of CreativeWork (e.g.  books, movies, photographs, software programs, etc.)  The schema.org/about property, meanwhile expects a value of Thing. Given the options, use hasPart to relate the many entities on the page to your creativeWorks and use about for anything else.

{
  "@context":"http://schema.org/",
  "@type":"CollectionPage",
  "name":"Local Search Optimization Series",
  "hasPart": [
    "http://thewebsite.com/local-seo-1.html",
    "http://thewebsite.com/local-seo-2.html",
    "http://thewebsite.com/local-seo-3.html"
  ]
}

More specific subtypes of http://schema.org/CollectionPage include:

Schema.org ItemList

Usage: Between 10,000 and 50,000 domains

The ItemList is more purpose built for organizing a list of items, there are several unique properties and subclasses. More specific kinds of ItemList include a BreadcrumbList and OfferCatalog.

  • schema.org/itemListElement – expects Text, ListItem or Thing as values.  You could make a simple list of texts, (e.g. “Blue”, “Red”, “White”), or refer to Things, similar to the CollectionPage or use ListItem for ordering of values (values have no order unless you make it explicit).

Text values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.

  • schema.org/itemListOrder – indicates the type of ordering involved. This would be used in conjunction with the ListItem position.
  • schema.org/numberOfItems – self explanatory.

The ItemList is a more descriptive way of organizing multiple entities for a page. Itemlist is good if want ordering of a checklist, a offer catalog or want to know how to implement BreadcrumbList. Given the choice between these first two options, I prefer ItemList because of its additional properties give you more control.

More specific subtypes of http://schema.org/ItemList include:

Webpage Anchor Tags

A third option is to use anchor tags to make a list of instances as top level entities. A top level entity is an entity that is found at the root (top) of the page graph, where it has property and values but nothing is above it, referring to that top entity as a value. Think of it as a Tree structure, the root of the tree is the webpage URL.  For more information on this I suggest you read Jarno van Driel’s article on mainEntityOfPage. Here is an example which has multiple top level entities, an Organization and WebSite.

In Schema App we have a design pattern in the use of Webpage URLs as a multipurpose key. The URL identifies an instance uniquely in the Editor and is also used by the WordPress Plugin to get data for that URL. If you want the ability to markup different parts of a webpage without using a CollectionPage or ItemList you can use anchor (#) tags. The system will pull out any items that include an anchor tag following the URL. So you could, in theory, create http://thewebsite.com/local-seo-services with a list of 10 services.

To do this, in the Editor you would create:

  • http://thewebsite.com/local-seo-page#service1
  • http://thewebsite.com/local-seo-page#service2
  • http://thewebsite.com/local-seo-page#service3

When the page http://thewebsite.com/local-seo-page is loaded it will pull in the #service1 #service2 and #service3 as top level entities.

Generally speaking you wouldn’t want to publish multiple top level entities as it makes it more difficult for search engines to distinguish the main purpose of the page. However, if you have a list of items that are in fact of equal importance, with no apparent order, you can use the anchor based approach to adding multiple entities on one page.

Previous Post
Managing Client Acconts
Next Post
What should I put in the URI field when I create a new entry in Schema App?

Menu