• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Pagination [Need Early reply]

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to work with the Pagination.

I have one page & I want to paginate that page for 5 entries.

The page consists of random topic_id, topic_tile.

Can u please help me to solve this issue.

Your kind & early reply is soliciated.

Thanks & Regards,

KUNAL


[originally posted on jforum.net by kunal2383]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot...................it works.................
[originally posted on jforum.net by kunal2383]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic