I watched the excellent screencast yesterday evening and set up a test site for testing this module and schema.org metadata in general. In the event example, the location was entered as free text which I found a bit confusing.

Many schema.org terms consist of nested items. For example, Event location is expected to be Place (or PostalAddress). Place has a property called geo, which is expected to be GeoCoordinates (or GeoShape). GeoCoordinates can then have longitude and latitude properties.

Let's assume that we have a content type "Event" which has the following fields:
- Title
- Date
- Street address
- City
- Country
- Latitude
- Longitude

So if I'm reading the schema.org documentation correctly here, the fields should be mapped to schema.org properties as follows:

Event
- name <--> field title
- startDate <--> field date (from date)
- endDate <--> field date (to date)
- location / Place
-- address / PostalAddress
--- streetAddress <--> field street address
--- addressLocality <--> field city
--- addressCountry <--> field country
-- geo / GeoCoordinates
--- latitude <--> field latitude
--- longitude <--> field longitude

It is trivial to make a "flat" mapping between the Drupal content fields to the right schema.org property names but I guess that correct way to use schema.org is to use nesting as presented in schema.org documentation. Can this kind of nesting be done using this module?

Comments

scor’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.x-dev
Category: support » feature

The main reason for location to be a text field is that the addressfield module does not yet support the right markup for nested fields. Also, the text field is more simpler to set up (and that's one less dependency), but I understand that some sites have nested fields in place, and I agree your request is valid. I'm marking this issue as feature request.

masipila’s picture

In my setup the address fields are standard textfields which are automatically filled with the OpenLayers Geocoder module. The beauty of this is that the user just have to input the address search and I get map, street address, city, country and coordinate information automatically populated. You can see this live at www.curlingcalendar.com (simply login with your facebook account and hit "add new tournament" from the left sidebar).

So my feature request is to simply map the standard textfields, not fields defined with streetaddress module. However, I have no idea what would be the best user interface implementation for nesting... I guess this is the hardest part in this...

scor’s picture

I'm missing a pointer to back this up, but I read somewhere on either schema.org or Google webmasters docs that they support both the plain text and nested markup elements as value for location (will post back here when I find the link). so both cases should be covered by the search engines.

arghc’s picture

I am also very interested in nested entities WRT reviews with movies, books, tv shows, products, etc.