Add SEO Meta to CATEGORY/PRODUCT/FOLDER/CONTENT
This commit is contained in:
@@ -3,15 +3,30 @@
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-category{/block}
|
||||
|
||||
{* Page Title *}
|
||||
{block name='no-return-functions' append}
|
||||
{loop name="category.seo.title" type="category" id="{category attr="id"}"}
|
||||
{$page_title = {$META_TITLE}}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
{* Meta *}
|
||||
{block name="meta"}
|
||||
{loop name="category.seo.meta" type="category" id="{category attr="id"}"}
|
||||
{if $META_DESCRIPTION}<meta name="description" content="{$META_DESCRIPTION}">{/if}
|
||||
{if $META_KEYWORDS}<meta name="keywords" content="{$META_KEYWORDS}">{/if}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
{$sBreadcrumb = []}
|
||||
{$breadcrumbs = []}
|
||||
{loop name="category_path" type="category-path" category="{category attr="id"}"}
|
||||
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL nofilter}]}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
|
||||
{* Content *}
|
||||
{block name="main-content"}
|
||||
<div class="main layout-col-2-left">
|
||||
{$limit={$smarty.get.limit|default:8}}
|
||||
@@ -19,7 +34,7 @@
|
||||
{$product_order={$smarty.get.order|default:'alpha'}}
|
||||
<article class="col-main {$smarty.get.mode|default:"grid"}" role="main">
|
||||
{ifloop rel="product_list"}
|
||||
{assign var="amount" value="{count type="product" category={category attr="id"}}"}
|
||||
{assign var="amount" value="{count type="product" category="{category attr="id"}"}"}
|
||||
{include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order amount={$amount}}
|
||||
<div id="category-products">
|
||||
<div class="products-content">
|
||||
|
||||
@@ -1,36 +1,61 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{block name="no-return-functions"}
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-content{/block}
|
||||
|
||||
{* Page Title *}
|
||||
{block name='no-return-functions' append}
|
||||
{loop name="content.seo.title" type="content" id="{content attr="id"}"}
|
||||
{$page_title = {$META_TITLE}}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
{block name="body-class"}page-content{/block}
|
||||
{* 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}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
|
||||
{$breadcrumbs = []}
|
||||
{loop type="content" name="content-breadcrumb" id="{content attr="id"}"}
|
||||
{loop name="folder_path" type="folder-path" folder="{$DEFAULT_FOLDER}"}
|
||||
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL}]}
|
||||
{/loop}
|
||||
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL}]}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main layout-col-2-left" <!-- class="mainlayout-col-2-left -->">
|
||||
<div class="main layout-col-2-left">
|
||||
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
{loop name="blog.article" type="content" current="yes"}
|
||||
<h1>{$TITLE}</h1>
|
||||
<p class="chapo">
|
||||
{$CHAPO}
|
||||
</p>
|
||||
<p>{$DESCRIPTION nofilter}</p>
|
||||
{loop name="blog.content" type="content" current="yes"}
|
||||
<h1 id="main-label" class="page-header">{$TITLE}</h1>
|
||||
{if $CHAPO}
|
||||
<div class="chapo">
|
||||
{$CHAPO}
|
||||
</div>
|
||||
{/if}
|
||||
{if $DESCRIPTION}
|
||||
<div class="description">
|
||||
{$DESCRIPTION nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
{if $POSTSCRIPTUM}
|
||||
<small class="postscriptum">
|
||||
{$POSTSCRIPTUM}
|
||||
</small>
|
||||
{/if}
|
||||
{/loop}
|
||||
</article>
|
||||
|
||||
<aside class="col-left" role="complementary" itemscope itemtype="http://schema.org/WPSideBar">
|
||||
|
||||
{include file="includes/asides/articles.html"}
|
||||
|
||||
{include file="includes/asides/articles.html"}
|
||||
</aside>
|
||||
|
||||
</div><!-- /.layout -->
|
||||
{/block}
|
||||
|
||||
{block name="after-javascript-include"}{/block}
|
||||
@@ -36,14 +36,14 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<meta charset="utf-8">
|
||||
|
||||
{* Page Title *}
|
||||
<title>{block name="page-title"}{strip}{if $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title} - {/foreach}{/if}{$store_name}{/strip}{/block}</title>
|
||||
<title>{block name="page-title"}{strip}{if $page_title}{$page_title}{elseif $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title} - {/foreach}{$store_name}{/if}{/strip}{/block}</title>
|
||||
|
||||
{* Meta Tags *}
|
||||
<meta name="generator" content="{intl l='Thelia V2'}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
{block name="meta"}
|
||||
<meta name="description" content="{$store_name}">
|
||||
<meta name="description" content="{if $page_description}{$page_description}{else}{$store_name}{/if}">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
{/block}
|
||||
|
||||
|
||||
@@ -3,6 +3,21 @@
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-product{/block}
|
||||
|
||||
{* Page Title *}
|
||||
{block name='no-return-functions' append}
|
||||
{loop name="product.seo.title" type="product" id="{product attr="id"}"}
|
||||
{$page_title = {$META_TITLE}}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
{* Meta *}
|
||||
{block name="meta"}
|
||||
{loop name="product.seo.meta" type="product" id="{product attr="id"}"}
|
||||
{if $META_DESCRIPTION}<meta name="description" content="{$META_DESCRIPTION}">{/if}
|
||||
{if $META_KEYWORDS}<meta name="keywords" content="{$META_KEYWORDS}">{/if}
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
{$breadcrumbs = []}
|
||||
@@ -14,7 +29,7 @@
|
||||
{/loop}
|
||||
{/block}
|
||||
|
||||
|
||||
{* Content *}
|
||||
{block name="main-content"}
|
||||
<div class="main">
|
||||
{loop name="product.details" type="product" id="{product attr="id"}"}
|
||||
@@ -232,7 +247,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
</article><!-- /product -->
|
||||
</article><!-- /#product -->
|
||||
|
||||
<ul class="pager">
|
||||
{if $HAS_PREVIOUS == 1}
|
||||
@@ -247,9 +262,6 @@
|
||||
{/if}
|
||||
</ul>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
|
||||
</div><!-- /.main -->
|
||||
{/block}
|
||||
Reference in New Issue
Block a user