1

I'm adding Microdata to a page and I'm trying to associate a list of events to a superEvent, but I don't manage to make it work when checking at: http://www.google.com/webmasters/tools/richsnippets?q=

Here the concept code:

<div id="main" itemscope="main" itemtype="http://schema.org/Event">
<span itemprop="name">Main
</div>
<div itemscope="event" itemtype="http://schema.org/Event">
<span itemprop="name">Event
<span itemprop="superEvent" itemref="main">
</div>

Any idea?

unor
  • 92,415
  • 26
  • 211
  • 360

2 Answers2

5

Problems with your Microdata:

To link events via the subEvent/superEvent properties, you could either use the itemref attribute or nest the items.

With itemref and superEvent, it could look like:

<div itemprop="superEvent" itemscope itemtype="http://schema.org/Event" id="main">
  <span itemprop="name">Main</span>
</div>

<div itemscope itemtype="http://schema.org/Event" itemref="main">
  <span itemprop="name">Event</span>
</div>

With itemref and subEvent, it could look like:

<div itemscope itemtype="http://schema.org/Event" itemref="secondary">
  <span itemprop="name">Main</span>
</div>

<div itemprop="subEvent" itemscope itemtype="http://schema.org/Event" id="secondary">
  <span itemprop="name">Event</span>
</div>

Nesting (without using itemref) could look like:

<div itemscope itemtype="http://schema.org/Event">
  <span itemprop="name">Main</span>

  <div itemprop="subEvent" itemscope itemtype="http://schema.org/Event">
    <span itemprop="name">Event</span>
  </div>

</div>
Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
1

I managed to do this in the end:

<div id="main" itemprop="superEvent" itemscope="main" itemtype="http://schema.org/Event">
<span itemprop="name">Main
</div>
<div itemscope="event" itemtype="http://schema.org/Event" itemref="main">
<span itemprop="name">Event
</div>