• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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]
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic