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