1 line
2.4 KiB
Smarty
1 line
2.4 KiB
Smarty
<meta property="og:site_name" content="{$shop_name}" />
|
|
<meta property="og:title" content="{$meta_title|escape:'html':'UTF-8'}" />
|
|
|
|
<!-- Home -->
|
|
{if $page_name == 'index'}
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:url" content="{$base_uri}" />
|
|
<meta property="og:image" content="{$img_dir}logo-fb.png" />
|
|
{if isset($meta_description) AND $meta_description}
|
|
<meta property="og:description" content="{$meta_description|escape:'html':'UTF-8'}" />
|
|
{/if}
|
|
|
|
<!-- Categorie -->
|
|
{elseif $page_name == 'category' && isset($category)}
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:url" content="{$link->getCategoryLink($category->id)}" />
|
|
<meta property="og:image" content="{$base_dir}img/c/banners/{$category->id}.jpg" />
|
|
{if !empty($category->description)}
|
|
<meta property="og:description" content="{$category->description|strip_tags}" />
|
|
{/if}
|
|
|
|
<!-- Produit -->
|
|
{elseif $page_name == 'product' && isset($product)}
|
|
<meta property="og:type" content="product" />
|
|
<meta property="og:url" content="{$link->getProductLink($product->id)}" />
|
|
<meta property="og:image" content="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" />
|
|
{if !empty($product->resume)}
|
|
<meta property="og:description" content="{$product->resume|strip_tags}" />
|
|
{elseif !empty($product->description)}
|
|
<meta property="og:description" content="{$product->description|strip_tags}" />
|
|
{/if}
|
|
|
|
{if isset($price)}
|
|
<meta property="product:price:amount" content="{$price}" />
|
|
{/if}
|
|
<meta property="product:price:currency" content="{$currency->iso_code}" />
|
|
|
|
{if isset($weight) && ($weight != 0)}
|
|
<meta property="product:weight:value" content="{$weight}" />
|
|
<meta property="product:weight:units" content="{$weight_unit}" />
|
|
{/if}
|
|
|
|
<!-- PSBlog -->
|
|
{elseif $page_name == 'module-psblog-posts'}
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="{BlogLink::linkPost($post->id, $post->link_rewrite)}" />
|
|
{if isset($post_images[0])}
|
|
<meta property="og:image" content="{$posts_img_path|escape:'html':'UTF-8'}thumb/{$post_images[0].img_name|escape:'html':'UTF-8'}" />
|
|
{/if}
|
|
|
|
<!-- Autres -->
|
|
{else}
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:image" content="{$img_dir}logo-fb.png" />
|
|
{if isset($meta_description) AND $meta_description}
|
|
<meta property="og:description" content="{$meta_description|escape:'html':'UTF-8'}" />
|
|
{/if}
|
|
{/if}
|