Starting with SC 2.3.0 Beta 4 or RC 1, Showcase items no longer use the Core XF open_graph_meta template and instead will use the nflj_showcase_open_graph_meta template which will allow you to customize the OG meta to your liking.
The og:image is now set to use the showcase item cover image as default (instead of the Forum Logo which the core xenforo template uses)
Also, I've added the Showcase Item Description to replace using the SITE Description.
This is the nflj_showcase_open_graph_meta template. The ONLY difference between this and core XF is that this one allows (requires) you to map in a specific og:image
This is how you use it (this is an example from the showcase item template)
The og:image is now set to use the showcase item cover image as default (instead of the Forum Logo which the core xenforo template uses)
Also, I've added the Showcase Item Description to replace using the SITE Description.
This is the nflj_showcase_open_graph_meta template. The ONLY difference between this and core XF is that this one allows (requires) you to map in a specific og:image
HTML:
<xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
<meta property="og:site_name" content="{$xenOptions.boardTitle}" />
<xen:if is="{$avatar}"><meta property="og:image" content="{$avatar}" /></xen:if>
<meta property="og:image" content="{$image}" />
<meta property="og:type" content="{xen:if $ogType, $ogType, article}" />
<meta property="og:url" content="{xen:raw $url}" />
<meta property="og:title" content="{xen:raw $title}" />
<xen:if is="{$description}"><meta property="og:description" content="{xen:raw $description}" /></xen:if>
{xen:raw $ogExtraHtml}
<xen:if is="{$xenOptions.facebookAppId}"><meta property="fb:app_id" content="{$xenOptions.facebookAppId}" /></xen:if>
<xen:if is="{$xenOptions.facebookAdmins}"><meta property="fb:admins" content="{xen:helper implode, {$xenOptions.facebookAdmins}, ','}" /></xen:if>
</xen:if>
This is how you use it (this is an example from the showcase item template)
HTML:
<xen:container var="$head.openGraph">
<xen:include template="nflj_showcase_open_graph_meta">
<xen:set var="$url">{xen:link 'canonical:showcase', $item, 'page={$page}'}</xen:set>
<xen:set var="$title">{$item.item_name}</xen:set>
<xen:set var="$description">{xen:if '{$item.description}', '{$item.description}', '{xen:helper snippet, $item.message, 250}'}</xen:set>
<xen:set var="$image">{xen:helper fullurl, $item.cover_image.thumbnailUrl, 1}</xen:set>
</xen:include>
</xen:container>
Upvote
1