Experience sharing with long article pagination

Source: Internet
Author: User
Tags end split
when you publish an article, add a preset page break where you want it to be paged.

Implementation steps:

One, my backstage editor is FCK, how to let it have this function? The easiest way to do this is to replace a button that is not commonly used with the Insert Page Break button. (There are two files in the FCK folder "Fckeditor\editor\js", Fckeditorcode_gecko.js and Fckeditorcode_ Ie.js, give them the operation is OK, specifically do not say, no source files on hand, I do not know the specific code, interested in the friend PM me i preset the "<div>::</div>" as a page break, this casually set, As long as it does not appear in the article to the normal display of the line.

Second, write the front article display page code, how to link the database, read the database and other code will not say. Here is the key code:

' article page number parameter, starting from 1
page = request.querystring ("page")

' Split article by page break
Arrcontent = Split (RS ("article literal segment"), "<div>::</div>"

' Show the body of the article on the specified page
Arrcontent (page-1)

' Article pagination page Number link
Call Textpage (UBound (arrcontent))

Textpage function Code:
The following is a reference fragment:
Code:
<%
function Textpage (Pages)
If Pages > 0 Then
Response.Write (VbCrlf & "<div class=" "Textpage" ">")
For p = 1 to Pages+1
Response.Write ("<a href=" "id=" & ID & "&page=" & P & "" ">" & P & "page </a> |")
Next
Response.Write ("</div>")
End If
End Function
%>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.