Hello,
When I want to see only 10 posts in the “latest” section, and when there will be more, create a new page 2/2 etc.
How can I do that, please?
Pagination in Discourse
Juraj_Štefánik wants to know how to limit the number of posts displayed on the “latest” section to 10, with pagination for additional posts. However, Jagster and RGJ explain that pagination is not possible in Discourse due to its infinite scrolling design.
Jagster mentions that scrolling is a better option as it provides easier access to older content, and people tend not to click through multiple pages. Jagster further explains that implementing pagination would require loading headers of all topics, which is resource-intensive and unnecessary.
RGJ provides links to Discourse meta topics (1, 2) that support the idea that pagination is not possible.
Keegan suggests using the topic timeline as an alternative, which provides a sense of pagination by showing a limited number of posts.
Hello,
When I want to see only 10 posts in the “latest” section, and when there will be more, create a new page 2/2 etc.
How can I do that, please?
AFAIK you can’t use pagination. It is just impossible with this design.
Pagination is not that good actually. People has used to use it because earlier it was the easiest solution, but it is not that handy. There is always need to click to get forward and most of people have tendency not to click, they never go further than one or max two sub-pages. Scrolling gives easier access to older content.
Why would you like to use pagination?
In my work, they gave me such an assignment, so neither JavaScript nor it will work?
No, that won’t work.
You can use the topics below to convince your boss that they gave you an impossible task.
Well, Discourse is pure JavaScript so everything is possible ![]()
Disclaimer — I don’t code.
To get pagination you have to load headers of all topics. Otherwise you can’t know if a topic would be on page2, 79 or 2298. But that order is not fixed as it would be on blogish sites, like WordPress.
Everytime somebody is commenting, there is auto bump etc. that order shall change. So you should build all sub-pages everytime when something happends. I’m guessing that is really expensive.
Plus unnecessary. What does an user get if she/he/it knows there is 26768 sub-pages?
As I said I don’t code. But I’m doing UX/UI/content creating and quite often I have to say to a customer that wanted thing is impossible or really bad idea.
So. What is the real need why you should build up pagination on latest?