Question
Can I add pagination to my Help Center?
Answer
Yes, you can use the pagination helper {{pagination}}
to add pagination to the Help Center if you are comfortable using custom code in your Guide Theme. Pagination is available and included by default in:
- Home page
- Article page
- Contributions page
- Request List page
- Search Results page
- Section page
The pagination helper will only render if the number of elements (articles, posts, etc..) is greater than the size of a page, which is 30 elements per page. For example, if you are using the pagination helper on the Home page, it will only render on the Home page when the number of categories is greater than 30.
For more information, see the developer article: Pagination helper.
4 comments
Miguel Romero
is it possible to paginate 10 items per page?
0
Joshua Barnard
I'm also interested in this. I want to set a limit of 6 promoted articles on the home page and use pagination to show the rest.
0
Joshua Barnard
I figured out a way to limit the number of promoted articles.
It relies on the index of the array. I mostly want it as a safe guard against having too many promoted articles on the home page.
0
George Tian
Is there any variable of pagination helper? For example, {{#if pagination.has_next}} tells me if there is a next page or not? Or I must implement it with JS, instead of editing the hbs template.
0