Forum Moderators: phranque

Message Too Old, No Replies

Automatically Finding Natural Page Breaks

To split longer articles

         

trillianjedi

2:01 pm on Jun 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got a heavily customised CMS system and I need to automatically break longer articles into 2 or 3 pages with "next page" and "previous page" links - pretty standard stuff.

The content is stored with basic HTML tags in tact (so all paragraphs are surrounded by <p> tags etc).

What is a good way to automate the break points - any tips or hard and fast rules?

One option would be to work on character count and split at X characters, or find the nearest <p> tags or sub-title to X and break at that point.

Any better methods?

Thanks!

lammert

4:24 pm on Jun 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Searching for <p> breaks gives the most natural break, but those breaks might occur on an undesired location. When splitting a large article in smaller pages, you should split in such a way that there is a cliffhanger [en.wikipedia.org] which invites the visitor to go to the next page. And the only reliable way to decide where such a cliffhanger exists in the article is by manual splitting the text.

trillianjedi

4:29 pm on Jun 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, good point. There is a downside to automation.

Thanks - you've changed my mind ;)