clearFusionCMS Community
Adding Open Graph to Product Pages - Printable Version

+- clearFusionCMS Community (http://community.clearfusioncms.com)
+-- Forum: Resources (/forum-5.html)
+--- Forum: Tips and Tutorials (/forum-6.html)
+--- Thread: Adding Open Graph to Product Pages (/thread-163.html)



Adding Open Graph to Product Pages - paul - 07-30-2013 11:54 AM

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.


RE: Adding Open Graph to Product Pages - GTillett67 - 03-13-2017 06:44 PM

(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!