Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
From talking to folks at DrupalCon Denver about schema.org (sun and others), it seems there is an interest for being able to auto generate content types + fields from type definitions found on schema.org.
Proposed resolution
The schema.org vocabulary is available as machine readable format. This could be used to create content types and fields.
Remaining tasks
Code and test
User interface changes
New form in Web Services > Schema.org templates
API changes
none afaik.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1495372_2_schemaorg_auto_generate.patch | 3.22 KB | scor |
#1 | 1495372_schemaorg_auto_generate.patch | 3.23 KB | scor |
Comments
Comment #1
scor CreditAttribution: scor commentedThis is a very WIP proof of concept that I wrote in between sessions at Drupalcon. Still needs some work, but the basic idea is to offer a form where site admins can choose what type they want to import. For now, simple text fields are created for each property of the type. Note that this patch requires to download http://schema.rdfs.org/all.json and place it in the js folder of the module.
TODO:
- improve schema.org json caching support: maybe download it automatically and place it in the files directory
- offer a pre-import form to let users choose what fields they want to import
- better way to handle field machine name collision
- auto detect the right field types (date, entity reference)
Comment #2
scor CreditAttribution: scor commenteduse better permission and fix field machine names.
Comment #3
Sheldon Rampton CreditAttribution: Sheldon Rampton commentedThis is a really intriguing proof of concept. I think this has a lot of potential to improve the ease of creating Drupal websites that are standardized, richly searchable and interoperable with other websites.
Comment #4
Sheldon Rampton CreditAttribution: Sheldon Rampton commentedI've just released a 1.0 version of my Entity Field Builder module, which takes this idea from proof of concept to actual realization:
http://drupal.org/project/efb
I've used my EFB module in conjunction with the Schema.org module to build several Drupal websites now, and the experience has gone pretty well, so I'd encourage other people to try it out.
In addition to the 1.0 release, I've created a new video demo showing how it works:
http://www.youtube.com/watch?v=oY0NJgDMtC0
(If you want to skip past the discussion and go straight to the part showing how EFB works, that part starts about 6:30 minutes into the video.)
I've also created a modified version of the Schema.org kickstarter installation profile (currently available on Github) which can be used to quickly set up a Drupal instance with the Entity Fields Builder module already installed and working like the site in my demo:
https://github.com/sheldonrampton/schemaorg_kickstarter
Please try it out and let me know what you think!
Comment #5
agerard CreditAttribution: agerard commentedWow! I was just wondering if such a thing existed. Is it still alive? Will definitely try it.
Comment #6
epiro01 CreditAttribution: epiro01 commentedThis sounds extremely useful for drupal 8 migrations.