Boards Page Customizations and topic options
Hi Everyone,
We have made several cutomizations to the boards page in past but in one of our latest communities, we have a requirement where we need to use some options from the topic options dropdown, "Sort by latest post" is one of those.
In the boards page customizations, we use the following REST call to get the recent threads on the current board:
<#assign recent_threads = restadmin("/boards/id/${coreNode.id}/threads/recent?restapi.response_style=view&page_size=${itemPerPage}&page=${page_number}").threads/>
Using the page_size and page parameter, I am able to use the default pagination widget, but is there any way I can use the option which I mentioned above, to sort the threads?
One example which got me curious was here
http://community.eu.playstation.com/t5/PS4-General/bd-p/bEN_PS4GD
They have customized the boards page but when I logged in and check, the Sort thread options from the topic options dropdown was working fine, can any one please explain how can I use these in the custom boards page threads listing component?
Hi Gursimrat ,
even if it's true that this page has been customized, they are still using the out of the box message list component.
What they've done is to create a custom grid component (which for now can only be done by professional services).
Through a grid you are able to replace every single cell in the message list with a custom component.
This way, they're putting custom content in the table but still retaining the out of the box functionalities.
This is one of the reason why we always discourage from replacing a standard message list with a fully customized content. Doing so you would lose not only the functionalities you're referencing in your post (i.e. sorting) but also some administration functionalities, like moderation and batch processing.
In your case, because the list is generated by a custom query, you have to implement the logic to change the query you're using for retrieving the content by interpreting some query parameter you would pass to the page.
In your specific case you should be able to use the sort_by parameter to change the sort ordering.
Thanks,
Nico