Thanks for this great module! However Google does not show rich snippets because this module uses the old data-vocabulary.org namespace. I managed to have Google show Rich Snippets for recipes powered by this module by updating its namespace to schema instead of data-vocabulary. Here is a live search results in Google's Recipe:

recipe-live-rich-snippet.png

You can also view some examples in the Rich Snippet testing tool: apple pie, Lemon-Coconut Squares.

Note that the image field is not part of the recipe module, but it is easy to add it manually following the instructions of the schema.org documentation on recipe.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Status: Active » Needs review
FileSize
2.37 KB

I've been running this patch on schema.openspring.net for several weeks now and once indexed by Google, it only took a few days for the Rich Snippet to show up in the live search results.

dcam’s picture

I applied the patch successfully. All the changes were applied correctly. I encountered a problem while testing it. The changes made in recipe_rdf_mapping() weren't showing up in the page, although the changes in theme_recipe_ingredients() did. I flushed all caches, but that didn't fix things. I uninstalled and re-enabled RDF and then all the patch's changes were working. I've never worked with RDF before, so if there's an easier way to get the changes to show up I don't know what it is yet.

Like I said, I'm not familiar with RDF, but this seems like a pretty good idea to me. Thanks for working on this, scor.

scor’s picture

Status: Needs review » Needs work

@dcam thanks for testing. you're right. I only tested by applying this patch and installing Drupal. I'll write an update function to apply the new mappings. expect a patch in the new few mins.

jvandervort’s picture

Status: Needs work » Fixed

Committed to dev. Thanks for the help.

scor’s picture

@jvandervort: great! I'll follow up with another patch with the update function then.

scor’s picture

Status: Fixed » Needs review
FileSize
447 bytes

here is the patch with the update function.

scor’s picture

same patch with slightly better comments.

dcam’s picture

#7 works for me. The new schema showed up right away this time.

jvandervort’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.