Last active
July 20, 2021 12:18
-
-
Save xlawok/89a366da179a007c725dcdede44308c2 to your computer and use it in GitHub Desktop.
Prestashop title and canonical
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{assign var="aw_url" value=$smarty.server.REQUEST_URI} | |
{if strpos($aw_url,'?') !== false} | |
<meta name="robots" content="noindex, follow"> | |
{elseif $page.meta.robots !== 'index'} | |
<meta name="robots" content="{$page.meta.robots}"> | |
{/if} | |
{if $page.page_name=="category"} | |
<title>{block name='head_seo_title'}{$page.meta.title} | Olelux{/block}</title> | |
{elseif $page.page_name=="product"} | |
<title>{block name='head_seo_title'}{$page.meta.title} | Olelux{/block}</title> | |
{else} | |
<title>{block name='head_seo_title'}{$page.meta.title} {/block}</title> | |
{/if} | |
{if isset($smarty.get.id_category) } | |
<link rel="canonical" href="{$link->getCategoryLink($smarty.get.id_category)}"> | |
{elseif isset($smarty.get.id_manufacturer)} | |
<link rel="canonical" href="{$link->getManufacturerLink($smarty.get.id_manufacturer)}"> | |
{elseif $page.page_name=="new-products"} | |
<link rel="canonical" href="{$link->getPageLink('new-products')}"> | |
{elseif $page.page_name=="best-sales"} | |
<link rel="canonical" href="{$link->getPageLink('best-sales')}"> | |
{elseif $page.canonical} | |
<link rel="canonical" href="{$page.canonical}"> | |
{/if } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment