Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

autopagination  RSS feed

 
shyamkumar bopannachengalaiah
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have a big text, how can I put in to my site and split in more pages.
I`m interested to auto split after a number of characters.is there is a way for auto pagination.
 
arulk pillai
Author
Ranch Hand
Posts: 3413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use indexes to display


0 - 50 --> page 1
51 - 100 --> page 2
and so on.

You can store the

begin and end index values in a hidden field or via URL rewriting.

Also need to calculate the total number of pages --> integer value of total characters (e.g 125) / charecters per page (E.g 50) + 1 (if the remainder is > 0)),

in this case 3 pages. For remainder use the % operator.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!