припаять link rel="next" и link rel="prev"
Posted: Thu Mar 13, 2014 5:07 pm
Здравствуйте, подскажите как реализовать link rel="next" и link rel="prev" к пагинации правильно ?
SmartCJ Support Forum
https://smartcj.com/forum/
Code: Select all
<navigation>
<a href="/category/<!--CATEGORY_ID-->/<!--CATEGORY_NAME-->/<!--SORT_ORDER-->/<!--PAGE_NUM-->/" title="<!--PAGE_NUM-->" target="_self"><!--PAGE_NUM--></a>
</navigation>Code: Select all
1
<a href="/category/0/All/ctr/2/" title="2" target="_self">2</a>
<a href="/category/0/All/ctr/3/" title="3" target="_self">3</a>
<a href="/category/0/All/ctr/4/" title="4" target="_self">4</a>
<a href="/category/0/All/ctr/5/" title="5" target="_self">5</a>
<span class='scj_dots'>...</span>
<a href="/category/0/All/ctr/9/" title="9" target="_self">9</a>
<a href="/category/0/All/ctr/10/" title="10" target="_self">10</a>
<a href="/category/0/All/ctr/11/" title="11" target="_self">11</a>Code: Select all
1
<link rel="next" href="/category/0/All/ctr/2/" title="2" target="_self">2</a>
<link rel="next" href="/category/0/All/ctr/3/" title="3" target="_self">3</a>
<link rel="next" href="/category/0/All/ctr/4/" title="4" target="_self">4</a>
<link rel="next" href="/category/0/All/ctr/5/" title="5" target="_self">5</a>
<span class='scj_dots'>...</span>
<link rel="next" href="/category/0/All/ctr/9/" title="9" target="_self">9</a>
<link rel="next" href="/category/0/All/ctr/10/" title="10" target="_self">10</a>
<link rel="next" href="/category/0/All/ctr/11/" title="11" target="_self">11</a>Code: Select all
<link rel="prev" href="/category/0/All/ctr/1/" title="1" target="_self">1</a>
<link rel="prev" href="/category/0/All/ctr/2/" title="2" target="_self">2</a>
<link rel="prev" href="/category/0/All/ctr/3/" title="3" target="_self">3</a>
<link rel="prev" href="/category/0/All/ctr/4/" title="4" target="_self">4</a>
5
<link rel="next" href="/category/0/All/ctr/6/" title="6" target="_self">6</a>
<span class='scj_dots'>...</span>
<link rel="next" href="/category/0/All/ctr/10/" title="10" target="_self">10</a>
<link rel="next" href="/category/0/All/ctr/11/" title="11" target="_self">11</a>не совсем понимаю каким образом это увязать с нужным кодом ссылкиadmin wrote:Смысл следующий
<navigation>
if ('<!--PAGE_NUM-->' < $_GET['page']) {
echo class=prev
} else {
echo class=next
}
</navigation>
при такой конструкцииadmin wrote:<navigation>
<a href=....
<? if ('<!--PAGE_NUM-->' < $_GET['page']) {
echo class=prev
} else {
echo class=next
}
?>
target="_self"><!--PAGE_NUM--></a>
</navigation>
Code: Select all
<navigation>
<a href="/category/<!--CATEGORY_ID-->/<!--CATEGORY_NAME-->/<!--SORT_ORDER-->/<!--PAGE_NUM-->/" title="<!--PAGE_NUM-->" <? if ('<!--PAGE_NUM-->' < $_GET['page']) {
echo class=prev
} else {
echo class=next
}
?> target="_self"><!--PAGE_NUM--></a>
</navigation>