clearFusionCMS Community

Full Version: Adding Open Graph to Product Pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Adding open graph ( http://ogp.me/ ) to product pages is a simple matter of adding additional meta data to the template used for formatting the product page.

Edit the template that you're using for the product page and add the following to the head section of the template:
Code:
<meta property="og:title" content="[[+meta_title]]" />
<meta property="og:type" content="website" />
<meta property="og:url" content="[[self &abs=`1`]]" />
<meta property="og:site_name" content="[[+sitename]]" />
<meta property="og:description" content="[[+summary]]" />
[[if &subject=`[[store.showProductImage &linkOnly=`1`]]` &operator=`!empty` &then=`<meta property="og:image" content="[[store.showProductImage &abs=`1` &linkOnly=`1`]]" />`]]
When you refresh your site clearFusionCMS will complete the information for you.
(07-30-2013 11:54 AM)paul Wrote: [ -> ]Adding open graph ( http://ogp.me/ ) to product pages is a simple matter of adding additional meta data to the template used for formatting the product page.

Edit the template that you're using for the product page and add the following to the head section of the template:
Code:
<meta property="og:title" content="[[+meta_title]]" />
<meta property="og:type" content="website" />
<meta property="og:url" content="[[self &abs=`1`]]" />
<meta property="og:site_name" content="[[+sitename]]" />
<meta property="og:description" content="[[+summary]]" />
[[if &subject=`[[store.showProductImage &linkOnly=`1`]]` &operator=`!empty` &then=`<meta property="og:image" content="[[store.showProductImage &abs=`1` &linkOnly=`1`]]" />`]]
When you refresh your site clearFusionCMS will complete the information for you.

I did have a problem with understanding the template, so I asked my webmaster for a quick explanation. With this tutorial and a little guidance, I have implemented this to my website. Thanks!
Reference URL's