michal95nh Posted April 26, 2019 Share Posted April 26, 2019 Hello, how I can add <META NAME="robots" CONTENT="noindex,follow"> for pagination in presta 1.7 ? If I add <META NAME="robots" CONTENT="noindex,follow"> in pagination.tpl I have noindex for all category where is pagination. {if $pagination.should_be_displayed} <hr class="mt-0 mb-5"> <nav class="pagination"> {block name='pagination_page_list'} <ul class="page-list list-inline"> {foreach from=$pagination.pages item="page"} <li class="list-inline-item{if $page.current} current{/if}"> {if $page.type === 'spacer'} <span class="spacer">…</span> {else} <a rel="{if $page.type === 'previous'}prev{elseif $page.type === 'next'}next{else}nofollow{/if}" href="{$page.url}" class="{if $page.type === 'previous'}previous btn btn-primary mr-3 {elseif $page.type === 'next'}next btn btn-primary ml-3 {else}mr-2 {/if}{['disabled' => !$page.clickable, 'js-search-link' => true]|classnames}" > {if $page.type === 'previous'} {l s='Previous' d='Shop.Theme.Actions'} {elseif $page.type === 'next'} {l s='Next' d='Shop.Theme.Actions'} {else} {$page.page} {/if} </a> {/if} </li> {/foreach} </ul> {/block} </nav> {/if} Link to comment Share on other sites More sharing options...
Rolige Posted April 26, 2019 Share Posted April 26, 2019 Hello: You should check some conditions in your TPL after adding your code. For example check if you are in pages 2, 3, 4..... {if $smart.get.p > 1} {*add your code*} {/if} I hope this is what you are looking for if I understand well. Regards Link to comment Share on other sites More sharing options...
sajjads3 Posted April 14, 2021 Share Posted April 14, 2021 hi , i use this cod {if $smart.get.p > 1} <META NAME="robots" CONTENT="noindex,follow"> {/if} in pagination.tpl but not working pls someone help how can i can add <META NAME="robots" CONTENT="noindex,follow"> for pagination in presta 1.7 Link to comment Share on other sites More sharing options...
skansa Posted August 26, 2021 Share Posted August 26, 2021 On 4/14/2021 at 2:43 PM, sajjads3 said: hi , i use this cod {if $smart.get.p > 1} <META NAME="robots" CONTENT="noindex,follow"> {/if} in pagination.tpl but not working pls someone help how can i can add <META NAME="robots" CONTENT="noindex,follow"> for pagination in presta 1.7 Has anyone succeeded in the enterprise? I have the same problem with Prestashop 1.7.7 . Thanks. Link to comment Share on other sites More sharing options...
HaCos Posted September 6, 2021 Share Posted September 6, 2021 (edited) It would be wiser if you applied such a rule in robots.txt instead of the page header. SEO oriented - its recommended that you allow the index of all pages & you manage pagination properly by using canonical tags. Edited September 6, 2021 by HaCos (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now