OpenGraph markup for Simpla CMS


In the index.tpl of your template, add <head> </head> between the tags:
<meta property="og:title" content="{if $module == 'ProductsView' || $module == 'ProductView'}{$product->name|escape}{else}{$page->header|escape}{/if}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{$config->root_url}{url}" />
<meta property="og:image" content="{if $module == 'ProductsView' || $module == 'ProductView'}{$product->image->filename|resize:330:300}{else}/design/YOUR_THEME/PATH_TO_LOGO.png{/if}" />
{if $module == 'ProductsView' || $module == 'ProductView'}<meta property="og:description" content="{$product->annotation|strip_tags}" />{/if}

Note: Don't forget to specify the path to your logo. To do this, replace /design/YOUR_THEME/PATH_TO_LOGO.png with the path to your logo.





Go back
14-11-2022, 13:07