Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding Open Graph to Product Pages
07-30-2013, 11:54 AM
Post: #1
Adding Open Graph to Product Pages
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.

clearFusionCMS Lead Developer
Find all posts by this user
Quote this message in a reply
03-13-2017, 06:44 PM (This post was last modified: 03-13-2017 06:45 PM by GTillett67.)
Post: #2
RE: Adding Open Graph to Product Pages
(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!
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)