Using Fremarker, add the following line to your file:
Then, make a call to the pagination macro, as in
Where "action" is the JForum action name to there the link should point to. This macro expects the following variables to exist in the Freemarker context:
- totalRecords: how many records exist
- recordsPerPage: how many to display per page
- totalPages: how many pages exist for this record set
- thisPage: the current page number
- contextPath: Application's context path
- moduleName: JForum's module name to send to
- extension: JForum
servlet extension
- I18n: a valid instance of the class I18n
The macro source code is at templates/macros/pagination.ftl
Rafael
[originally posted on jforum.net by Rafael Steil]