Integrating Facebook Open Graph Tags into Templates

60 views
Skip to first unread message

Kathleen Pottle

unread,
May 15, 2012, 9:11:27 AM5/15/12
to reddot-cms-users

Is anyone using the Open Graph meta tags to incorporate Facebook plug-ins like the Like button into their templates?   We’ve used instances where we embed the Facebook Like button code into some of our pages, but we would like to specify a particular image and teaser text to accompany news stories in order to display on the Facebook wall - this can be accomplished using the Open Graph meta tags. 

 

We can populate the value of these tags through transfer elements that exist in our news story template, but ideally would like to find a way to set their value to already-existing image and text elements so that editors would not need to fill in these additional transfer elements.  Has anyone used something similar?  We have been trying to use render tags to set the values but have not been successful so far!

 
Thanks!

 
Kathleen S. Pottle
Web Coordinator
Phillips Exeter Academy
 

Jian Huang

unread,
May 15, 2012, 11:05:05 AM5/15/12
to reddot-c...@googlegroups.com
Hi Kathleen,

There are multiple ways to solve this issue.  Will start with your existing solution.

With rendertag, you are probably using

Context:CurrentPage.Elements.GetElement(con_body).Value[Int:0].......

Well, this has a major caching and performance drawback, but it should get the job done.  If it doesn't seem work, check syntax and refer to the navigation manager manual, there should be some rendertag samples in there.

The second out of box solution is to create a dynamic anchor, pre-reference it to the container con_body, then just pull the content through

<!IoRangeDynLink>
<%anc_dyn_content_link%>
<meta property="og:title" content="<%hdl_title%>"/>
<meta property="og:image" content="<%img_main%>"/>
<!/IoRangeDynLink>

I am little surprised that project still uses transfer element (not with list or dynamic anchor) because that is an old practice that went away with version 6.

Any, the last and problem inducing solution is to use preexecution to pull the content through, but it would break if the content has quotes in it.

Hope my answer help.

-Jian

Kathleen Pottle

unread,
May 15, 2012, 1:08:17 PM5/15/12
to reddot-c...@googlegroups.com
Thanks for the information!

--
You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/reddot-cms-users/-/KsvT7HeQlRAJ.
To post to this group, send email to reddot-c...@googlegroups.com.
To unsubscribe from this group, send email to reddot-cms-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.



--
Reply all
Reply to author
Forward
0 new messages