Jump to content

Recommended Posts

he estado buscando y me aparece esta solución pero como no soy experto les pedía ayuda a ustedes para saber donde la debo colocar y si es apropiado gracias de antemano
Etiqueta CANONICAL para Prestashop para evitar el contenido duplicado
tengo que buscar en editar el fichero header.tpl que esta en midominio/themes/leo../header.tpl 
es correcto?
pero mi duda es donde pongo esto
<!-- canonical -->
{if $page_name == 'index' or $page_name == 'search'}
<link rel="canonical" href="{$base_dir}" />
{elseif $page_name == 'category' or $page_name == 'best-sales' or $page_name == 'cart' 
or $page_name == 'discount' or $page_name == 'manufacturer' or $page_name == 'new-products'
or $page_name == 'prices-drop'}
<link rel="canonical" href="{$base_dir}
{$request_uri|substr:1|regex_replace:'/\/(.*)/':''|regex_replace:'/\?(.*)/':''}" />
{else}
<link rel="canonical" href="{$base_dir}{$request_uri|substr:1}" />
{/if}
<!-- /canonical -->
ya le digo que no se y tengo pánico en ponerlo mal y que no me funcione la web 
gracias
en teoria si no me he equivocado esto es lo que hay en el fichero header .tpl



* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!DOCTYPE HTML>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"{if isset($language_code) && $language_code} lang="{$language_code|escape:'html':'UTF-8'}"{/if}><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7"{if isset($language_code) && $language_code} lang="{$language_code|escape:'html':'UTF-8'}"{/if}><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8"{if isset($language_code) && $language_code} lang="{$language_code|escape:'html':'UTF-8'}"{/if}><![endif]-->
<!--[if gt IE 8]> <html class="no-js ie9"{if isset($language_code) && $language_code} lang="{$language_code|escape:'html':'UTF-8'}"{/if}><![endif]-->
<html{if isset($language_code) && $language_code} lang="{$language_code|escape:'html':'UTF-8'}"{/if} {if isset($IS_RTL) && $IS_RTL} dir="rtl" class="rtl{if isset($LEO_DEFAULT_SKIN)} {$LEO_DEFAULT_SKIN}{/if}" {else} class="{if isset($LEO_DEFAULT_SKIN)}{$LEO_DEFAULT_SKIN}{/if}" {/if}>
{include file="$tpl_dir./layout/setting.tpl"}
<head>
<meta charset="utf-8" />
<title>{$meta_title|escape:'html':'UTF-8'}</title>
{if isset($meta_description) AND $meta_description}
<meta name="description" content="{$meta_description|escape:'html':'UTF-8'}" />
{/if}
{if isset($meta_keywords) AND $meta_keywords}
<meta name="keywords" content="{$meta_keywords|escape:'html':'UTF-8'}" />
{/if}
<meta name="generator" content="PrestaShop" />
<meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" />
{if $ENABLE_RESPONSIVE}<meta name="viewport" content="width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0" />{/if}
<meta name="apple-mobile-web-app-capable" content="yes" /> 
<link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" />
<link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" />

{if isset($css_files)}
{foreach from=$css_files key=css_uri item=media}
<link rel="stylesheet" href="{$css_uri|escape:'html':'UTF-8'}" type="text/css" media="{$media|escape:'html':'UTF-8'}" />
{/foreach}
{/if}

{if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)}
{$js_def}
{foreach from=$js_files item=js_uri}
<script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script>
{/foreach}
{/if}
{if $ENABLE_RESPONSIVE}
<link rel="stylesheet" type="text/css" href="{$content_dir}themes/{$LEO_THEMENAME}/css/responsive.css"/>
{else}
<link rel="stylesheet" type="text/css" href="{$content_dir}themes/{$LEO_THEMENAME}/css/non-responsive.css"/>
{/if}
<link rel="stylesheet" type="text/css" href="{$content_dir}themes/{$LEO_THEMENAME}/css/font-awesome.min.css"/>
{$HOOK_HEADER}
{if isset($LEO_CSS)}{foreach from=$LEO_CSS key=css_uri item=media}
<link rel="stylesheet" href="{$css_uri}" type="text/css" media="{$media}" />
{/foreach}{/if}
{if isset($CUSTOM_FONT)}
{$CUSTOM_FONT}
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Chewy::latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +

wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})(); 
</script>
{/if}
{if isset($LAYOUT_WIDTH)}
{$LAYOUT_WIDTH}
{/if}
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"/>
<!--[if IE 8]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{else} show-left-column{/if}{if $hide_right_column} hide-right-column{else} show-right-column{/if}{if isset($content_only) && $content_only} content_only{/if} lang_{$lang_iso} {if isset($LEO_LAYOUT_MODE)}{$LEO_LAYOUT_MODE}{/if}{if isset($USE_FHEADER) && $USE_FHEADER} keep-header{/if}{if isset($LEO_HEADER_STYLE)} {$LEO_HEADER_STYLE}{/if}{if $LEO_HEADER_STYLE!="header-hide-topmenu" && $LEO_SIDEBAR_MENU!="sidebar-hide"} double-menu{/if}">
{if !isset($content_only) || !$content_only}
{if isset($restricted_country_mode) && $restricted_country_mode}
<section id="restricted-country">
<p>{l s='You cannot place a new order from your country.'}{if isset($geolocation_country) && $geolocation_country} <span class="bold">{$geolocation_country|escape:'html':'UTF-8'}</span>{/if}</p>
</section>
{/if}
<section id="page" data-column="{$colValue}" data-type="{$LISTING_GRIG_MODE}">
<!-- Header -->
<header id="header">
<section class="header-container">
<div id="topbar">
{capture name='displayBanner'}{hook h='displayBanner'}{/capture}
{if $smarty.capture.displayBanner}
<div class="banner">
<div class="container">
<div class="row">
{$smarty.capture.displayBanner}
</div>
</div>
</div>
{/if}
{capture name='displayNav'}{hook h='displayNav'}{/capture}
{if $smarty.capture.displayNav}
<div class="nav">
<div class="container">
<div class="inner">
<nav>{$smarty.capture.displayNav}</nav>
</div>
</div>
</div>
{/if}
</div>
<div id="header-main">
<div class="container">
<div class="inner">
<div class="row">
<div id="header_logo" class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<a href="{if $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{$shop_name|escape:'html':'UTF-8'}">
<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>
</a>
</div>
<div class="col-xs-12 col-sm-9 col-md-9 col-lg-9">
{if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
</div>
</div>
</div>
</div>
</div>
</section>
</header>

{if isset($HOOK_TOPNAVIGATION)&&!empty($HOOK_TOPNAVIGATION)}
<div id="leo-megamenu" class="clearfix">
<div class="container">
<div class="inner">
{$HOOK_TOPNAVIGATION}
</div>
</div>
</div>
{/if} 

{if isset($HOOK_SLIDESHOW)&& !empty($HOOK_SLIDESHOW) && in_array($page_name,array('index'))}
<div id="slideshow" class="clearfix"> 
<div class="container">
<div class="inner">
{$HOOK_SLIDESHOW}
</div>
</div>
</div>
{/if}

{if $page_name !='index' && $page_name !='pagenotfound'}
<div id="breadcrumb">
<div class="container">
{include file="$tpl_dir./breadcrumb.tpl"}
</div>
</div>
{/if}
<!-- Content -->
<section id="columns" class="columns-container">
<div class="container">
{capture name='displayTopColumn'}{hook h='displayTopColumn'}{/capture}
{if $smarty.capture.displayTopColumn}
<div class="row">
<div id="top_column" class="center_column col-xs-12 col-sm-12 col-md-12">
{$smarty.capture.displayTopColumn}
</div>
</div>
{/if}
<div class="row">


{if !isset($LEO_LAYOUT_DIRECTION)} {assign var="LEO_LAYOUT_DIRECTION" value="default" scope='global'} {/if}
{include file="$tpl_dir./layout/{$LEO_LAYOUT_DIRECTION}/header.tpl"} 
{/if}
si ,me pudiesen ayudar seria de gran ayuda para mi muchas gracias
 
Usuario
Mensajes
34
Registrado
Lun Ago 03, 2015 11:51 am
 

 

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...