Microdata Provider
This module allows you to add Microdata via your templates. This module uses schema.org, but you can easily change the url using the yaml config., (*1)
About microdata
Microdata are additional attributes and tags added to describe and provide additional information about the content of your web page., (*2)
Some search engines (in particular Google) have adopted this technology and use it to enhance their search engine results (and the
appearance of your search engine result as well!), (*3)
For more information see: Google Webmaster Tools - About microdata, (*4)
Requirements
Author
- Mellisa Hankins [mell@milkywaymultimedia.com.au]
Install using composer
composer require milkyway/silverstripe-microdata:*
Example Code
Page.ss
Description
$Price
$microData.InStock$microData.NoStock
<% loop $Reviews %>
$Content
$microData.metaTag('rating','9.5/10')
<% end_loop %>
This module adds a new variable: $microData to the global scope that creates all the necessary attributes. Some are predefined,
but there are methods provided allowing you to add custom attributes. If you use a variable that does not exist on the MicrodataProvider class,
it will assume it is an itemprop attribute and will add the attribute accordingly., (*5)