deadpixel
Please help. What the Fb opengraph code for Xtgem, so we can customize ogg property (image) for
homepage only, but keep automatically put image of each page element in other pages?
if i use this code :
<meta property="og:image" content="....">
Copy code
it will change thumbnail of all pages, not only homepage.
Graham
deadpixel It would require some xtscript
this code would go in
_headtags
on the main homepage (index} it would set
homePage.jpg as the image
on other pages it takes the path of the page removes any dots and slashes and returns that as the image name IE
/mp3/index.html would return
mp3indexhtml.jpg as the image name
if your main index is index.html or something adjust the value in the 'if'
<!--parser:xtscript-->
var $path = <xt:url type="path" noquery="1" />
if $path == /index
var $ogImage=homePage
else
var $ogImage = call str_replace $subject=$path; $search=/ ; $replace
var $ogImage = call str_replace $subject=$ogImage; $search=. ; $replace
endif
print <meta property="og:image" content="http://site.com/images/$ogImage.jpg">
<!--/parser:xtscript-->
Copy code