Forum Discussion
Natkinson
9 months agoGenius
Tried a modified version of this changing the parameter and the pagination is still sending me to page 7, but now the pagination component isn't updating (it's stuck on displaying page 1) and it never progresses to further pages even though the URL changes
<#elseif tabParam = "activity">
<#assign pageSize=5 />
<#assign pageNum=webuisupport.path.rawParameters.name.get("items", "1") />
<#assign paginationOffset=(pageNum?number - 1) * 5 />
<#include "forum_feed_macro" />
<#assign msgCountQryAll=rest("2.0","/search?q=" + "SELECT count(*) FROM messages WHERE board.id='${currentBoard}'"?url).data.count />
<#assign res = liql(rest_20, "SELECT ${querySelect} FROM messages where board.id = '${currentBoard}' ORDER BY post_time desc LIMIT ${pageSize} OFFSET ${paginationOffset}") />
<@renderListResponse type="message" response=res render=messageRenderFullMessage />
<#assign pageable_item=webuisupport.paging.pageableItem.setCurrentPageNumber(pageNum?number).setItemsPerPage(5).setTotalItems(msgCountQryAll?number).setPagingMode("enumerated").build />
<@component id="common.widget.pager" pageableItem=pageable_item />
</#if>
I don't understand how to make this work correctly. I understand why "page" as a parameter doesn't work, but don't understand how to implement an alternative
Related Content
- 12 years ago
- 13 years agoInactive User
- 10 years ago
- 12 years ago