Added fallback for meta description for page category, product, folder, content, brand

This commit is contained in:
Julien Chanséaume
2014-07-22 11:48:16 +02:00
committed by Julien Chanseaume
parent 9ec204899c
commit 1e8e26cb1d
6 changed files with 13 additions and 14 deletions

View File

@@ -13,10 +13,7 @@
{* Meta *}
{block name="meta"}
{loop name="brand.seo.meta" type="brand" id="{brand attr="id"}"}
{if $META_DESCRIPTION}
<meta name="description" content="{$META_DESCRIPTION}">{/if}
{if $META_KEYWORDS}
<meta name="keywords" content="{$META_KEYWORDS}">{/if}
{include file="includes/meta-seo.html"}
{/loop}
{/block}

View File

@@ -12,9 +12,8 @@
{* Meta *}
{block name="meta"}
{loop name="category.seo.meta" type="category" current="yes"}
{if $META_DESCRIPTION}<meta name="description" content="{$META_DESCRIPTION}">{/if}
{if $META_KEYWORDS}<meta name="keywords" content="{$META_KEYWORDS}">{/if}
{loop name="category.seo.meta" type="category" category="{category attr="id"}"}
{include file="includes/meta-seo.html"}
{/loop}
{/block}

View File

@@ -13,8 +13,7 @@
{* Meta *}
{block name="meta"}
{loop name="content.seo.meta" type="content" id="{content attr="id"}"}
{if $META_DESCRIPTION}<meta name="description" content="{$META_DESCRIPTION}">{/if}
{if $META_KEYWORDS}<meta name="keywords" content="{$META_KEYWORDS}">{/if}
{include file="includes/meta-seo.html"}
{/loop}
{/block}

View File

@@ -13,8 +13,7 @@
{* Meta *}
{block name="meta"}
{loop name="folder.seo.meta" type="folder" id="{folder attr="id"}"}
{if $META_DESCRIPTION}<meta name="description" content="{$META_DESCRIPTION}">{/if}
{if $META_KEYWORDS}<meta name="keywords" content="{$META_KEYWORDS}">{/if}
{include file="includes/meta-seo.html"}
{/loop}
{/block}

View File

@@ -0,0 +1,6 @@
{if $META_DESCRIPTION}
<meta name="description" content="{$META_DESCRIPTION}">
{elseif $CHAPO}
<meta name="description" content="{$CHAPO|truncate:150:""}">
{/if}
{if $META_KEYWORDS}<meta name="keywords" content="{$META_KEYWORDS}">{/if}

View File

@@ -5,7 +5,7 @@
{* Page Title *}
{block name='no-return-functions' append}
{loop name="product.seo.title" type="product" id="{product attr="id"}" with_prev_next_info="1"}
{loop name="product.seo.title" type="product" id="{product attr="id"}" limit="1" with_prev_next_info="1"}
{$page_title = {$META_TITLE}}
{/loop}
{/block}
@@ -13,8 +13,7 @@
{* Meta *}
{block name="meta"}
{loop name="product.seo.meta" type="product" id="{product attr="id"}" limit="1" with_prev_next_info="1"}
{if $META_DESCRIPTION}<meta name="description" content="{$META_DESCRIPTION}">{/if}
{if $META_KEYWORDS}<meta name="keywords" content="{$META_KEYWORDS}">{/if}
{include file="includes/meta-seo.html"}
{/loop}
{/block}