PerBonomi
11 years agoBoss
Custom pagination refuses to cooperate
Hi there. I'm basically using the same code as here:
http://community.lithium.com/t5/Developers-Discussion/Implement-custom-pagination/m-p/106695/
My code:
<#assign page_size = 4/>
<#assign page_number = webuisupport.path.parameters.name.get("page",1) />
<#assign total_articles = restadmin("/blogs/id/${coreNode.id}/messages/count/").value?number/>
<#assign pageable_item = webuisupport.paging.pageableItem.setCurrentPageNumber(page_number).setItemsPerPage(page_size).setTotalItems(total_articles?number).setPagingMode("trivial").build />
<@component id="common.widget.pager"
pageableItem=pageable_item />Problem is, no matter what I try, I can't get past page 1.
I click on "next" (hover shows URL/page/2), but I just end up on URL again.
Have a feeling the webuisupport path code isn't "finding" page 2 and just jumping to page 1, but how to fix it?
Sign in to react to this post
Hi PerBonomi,
This might be the admin settings overriding issue.
Please change this and check.
Admin -> Discussion Style -> Blogs -> Number of articles per page
Let me know if this works.
Regards,
Mahesh
If my post is helpful and answers your question, please give "Kudos" and "Accept it as a Solution."