M
M
malekc2015-05-17 20:19:37
Prestashop
malekc, 2015-05-17 20:19:37

How to remove Rel canonical for pagination pages?

Who can tell me how to remove rel canonical for 2,3, n, n, ... category pages,
Prestashop 1.4.9.0
Now I use this code

{if $page_name == index}
<link rel="canonical" href="{$base_dir}" />
{elseif $page_name == product}
<link rel="canonical" href="{$base_dir}{$request_uri}" />
{else}
<link rel="canonical"
href="{$base_dir}{$request_uri|substr:1|regex_replace:'/\/(.*)/':''|regex_replace:'/\?(.*)/':''}" />
{/if}

But it works for any page. And you need a relay only for the 1st page of the category .. In general, a thing that many people need, help out who can)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question