Reputation: 424
I have installed schemaorg Module in Drupal 7 Project, and have followed instructions in this video.
But it is not working for me. I have tested it on this link.
But it is showing me the following result:
0 ERRORS 0 WARNINGS 0 ITEMS
And in source code as well I am not able to find any code for micro data...
Upvotes: 1
Views: 303
Reputation: 1625
Enable core RDF module along with Schemaorg module. You won't see any changes. If you go to admin area for content type there will be some new options. The link for all available types you can use: http://schema.org/docs/full.html
Please read this great article: https://www.lullabot.com/articles/how-does-rdf-work-in-drupal-7
UPDATE
I did some research, apparently according to google, JSON-LD is the recommended format, not RDFa as I thought. I fired up a new project on https://simplytest.me and I installed schemaorg module first. I had errors when I paste code snippet from Person content type, check here, but when I removed sioc:Item foaf:
from typeof=""
the errors were gone. Check here. Apparently you need to find the way through your template file to remove those extra lines in order to work from google search engine.
I tried new solution, and installed module which worked rightway from installation, which supports google JSON-LD, and the results were perfect!! The name of the module is structured data but you also need to install all dependencies, I think meta tags module, token.
When you visit the page in admin/config
after installing you will see at the bottom of the page STRUCTURED DATA (RICH SNIPPETS) - MAIN CONFIG where you can add site name and logo. When you create new content let's say article, on the left sidebar you will see Meta Tags, if you want to add some futures, or disable.
Just to add that it is very important the theme you are using. If you are using custom theme (like from your example) bear in mind that HTML code should be well structured.
There is also nice article adding structured data to Drupal 7 nodes, with some examples which can help you to dive into tpl files.
I hope it helps
Upvotes: 1