As part of my Google Summer of Code '12 project, I developed a patch publishing microdata for the phone field.

#1 phone_schemaorg-1740946-1.patch690 bytescolette
Members fund testing for the Drupal project. Drupal Association Learn more


colette’s picture

Status: Active » Needs review
690 bytes

The code does the following:

  • Chunk 1 ('microdata' => TRUE) enables the microdata UI in the field's instance settings form
  • Chunk 2 adds a suggested mapping to that UI. This means users can choose to use the term without having to look it up.

To test it, you can do the following:

  1. Add a phone field
  2. Select the suggested mapping from the microdata "field properties" form field at the bottom
  3. Add a node
  4. Copy the source to and check the JSON output for the microdata

For the moment, all automated tests will be put in the microdata module.