For example, if I configure a Product node type to be a Product schema.org type, then when configuring fields on that node type, would be nice for my schema.org choices to just be those allowed for Products.

Comments

scor’s picture

+1. In fact the schema.org export source file used by this module includes this information (see 'properties' element in each type), so this should be doable.

simon georges’s picture

It seems Entity Fields Builder is doing something like that. Is that what you had in mind?

scor’s picture

yes, EFB is interesting and I wish I had more time to explore its functionalities. If it cover the use case of this issue, we could close this issue in favor of the EFB module.

sheldon rampton’s picture

This indeed is a good use case for the EFB module.

scor’s picture

@Sheldon Rampton could you clarify? Does EFB support this use case? if so feel free to close this issue.

sheldon rampton’s picture

EFB uses the property definitions in schema.org to add a list of corresponding fields to the Fields UI form, with field names that correspond to their property names in Schema.org. For example, EFB creates an option to create a "field_description" which corresponds to the "description" field in Schema.org.

However, EFB does not constrain users' choices about what fields to create. It is still possible, using the same Drupal.org interface as always, to add whatever custom fields you want to add to an entity. I think this flexibility is important, because Schema.org is not (and probably never can be) a complete description of all of the fields that you might want to create for an entity. For example, the "Product" type in Schema.org currently has properties for "brand" and "color" but doesn't define a property for "price."

When effulgentsia wrote, "would be nice for my schema.org choices to just be those allowed for Products," I'm not sure what he meant by "just." If it means that he thinks it would be nice to constrain choices, then EFB doesn't do that. Rather, it adds options so that adding fields which correspond to Schema.org properties is quick and easy. You just check the checkbox alongside each property you want to add and submit the form. The EFB module therefore encourages site builders to make choices which are consistent with Schema.org, but it doesn't force them to make those choices. I think this is consistent with what effulgentsia actually intended. What do you think?

The EFB project page has a video tutorial which explains how it works in further detail:

https://drupal.org/project/efb