Created
October 26, 2021 11:46
-
-
Save xlawok/1c8cb596b640cae6c791d700a6337924 to your computer and use it in GitHub Desktop.
PRESTASHOP self canonical for category pagination and next/prev
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
{if isset($smarty.get.id_category) } | |
<link rel="canonical" href="{$page.canonical}"> | |
{if isset($listing.pagination)} | |
{foreach from=$listing.pagination.pages item="page"} | |
{if $page.type === 'previous'} | |
<link rel="prev" href="{$page.url}"> | |
{elseif $page.type === 'next'} | |
<link rel="next" href="{$page.url}"> | |
{/if} | |
{/foreach} | |
{/if} | |
{/if} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment