* 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.
2018-01-20 07:04 · (0)
* 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
2018-01-21 05:34 (edited 2018-01-21 05:45 by Graham ) · (0)

Online: Guests: 1