Hi.
Pagination and TOTAL_ITEMS doesn't work correctly at niche pages showing incorrect number of galleries. On one site it is too small, like 3-4 galleries, on another one shows more than 100k records, while site contains of one thousand only.
What can cause this problem ?
Pagination not working on niche pages
Re: Pagination not working on niche pages
Hi,
what script tags do you have in your template?
I mean <thumb and so on
what script tags do you have in your template?
I mean <thumb and so on
Don't forget to run script update
Re: Pagination not working on niche pages
<thumb num=1-6>
...
</thumb>
<thumb num=7-100>
...
</thumb>
<pagination skip_href_deletion=true first_pages=4 adjustment=2 last_pages=3 active_link_style=btn-alt>
...
</pagination>
<trader num=1-6>
...
</trader>
<trader num=7-18>
...
</trader>
For debug purposes i put <!--TOTAL_ITEMS--> in the top of the template, it shows 35 only while having 2532 galleries in this niche
...
</thumb>
<thumb num=7-100>
...
</thumb>
<pagination skip_href_deletion=true first_pages=4 adjustment=2 last_pages=3 active_link_style=btn-alt>
...
</pagination>
<trader num=1-6>
...
</trader>
<trader num=7-18>
...
</trader>
For debug purposes i put <!--TOTAL_ITEMS--> in the top of the template, it shows 35 only while having 2532 galleries in this niche
Re: Pagination not working on niche pages
content_search template with the same tags works fine
Re: Pagination not working on niche pages
are you 100% sure you don't have any other tags?
like <thumb search_log ?
create test template with
<!--TOTAL_ITEMS-->
<thumb num=1-6>
...
</thumb>
<pagination skip_href_deletion=true first_pages=4 adjustment=2 last_pages=3 active_link_style=btn-alt>
...
</pagination>
open as /?force_template=test&category_name=...
like <thumb search_log ?
create test template with
<!--TOTAL_ITEMS-->
<thumb num=1-6>
...
</thumb>
<pagination skip_href_deletion=true first_pages=4 adjustment=2 last_pages=3 active_link_style=btn-alt>
...
</pagination>
open as /?force_template=test&category_name=...
Don't forget to run script update
Re: Pagination not working on niche pages
Yes, you are right. At the bottom i have also
<thumb search_log=all num=1-200 order=hits filter=GET_GROUP_NAME>
...
</thumb>
<thumb search_log=all num=1-200 order=hits filter=GET_GROUP_NAME>
...
</thumb>
Re: Pagination not working on niche pages
After removing it everything works fine, but i want to keep related searches here.
Re: Pagination not working on niche pages
You need either to use page_main_tag or <search_log tag
https://smartcj.com/wiki/doku.php?id=ru ... _templates
otherwise the script decides that the tag that has higher num is the main tag at the page
https://smartcj.com/wiki/doku.php?id=ru ... _templates
otherwise the script decides that the tag that has higher num is the main tag at the page
Don't forget to run script update
Re: Pagination not working on niche pages
Thanks! That was the reason.