Content Linking Components [ASP]

xiaoxiao2021-03-05  24

There is a worry with DW to make a web page: new page, all other related pages must be re-made once a super chain

Pick up. Once, I will have a lot, I can't help but feel a lot of work. Imagine if there is a special file to be responsible for the page

That's better.

The Content Linking component is also gone. It is not, but you can create a directory table in these pages, and you can

They establish dynamic connections in the middle and automatically generate and update the directory table and the previous and subsequent web page navigation links.

Using this component, you first need to write a directory file, which is the order list file of the web address, it is a text file, you can

Free naming. Second, write an ASP file, automatically generate a chain directory page according to the information provided by the directory file. If needed

On each page, if the "forward or back" chain, write a file that automatically generates a page chain, you can use

INC is an extension, such as "nLink.inc". In the future, it contains it in each page in the group.

1, LINK.TXT

Redirect.asp? url = http://www.cnbruce.com/ cnbruce.comredirect.asp? URL = http://www.blueidea.com/ Blueidea.comRedirect.asp? URL = http: //www.it365cn. COM / IT365CN.COM

The URL of the directory file is the connection URL. The text is a connection text, and it is necessary to note that the intermediate is separated by the Tab key.

2, Link.asp

<% Set objnextLink = server.createObject ("mswc.nextLink")%> <% intcount = objnextLink.getlistcount ("link.txt") for i = 1 to intcount%> > <% = ObjnextLink.getNTHDESCRIPTION ("Link.txt", I)%>
<% Next%>

"Set ObjnextLink = Server.createObject (" Mswc.nextLink ")" Establishing the connection of a NextLink component

"ObjnextLink.getlistCount (" Link.txt ")" Extract the number of lists in the link.txt file "ObjnextLink.getntHURL (" Link.txt ", i)" ObjnexTlink "in the link. .Getnthdescription ("Link.txt", i) "Extracts the connection text of the clip text in the link.txt file

3, redirect.asp is also turning to files.

<% Response.clearresponse.redirect request.QueryString ("URL")%>

Oh, is it really useless to "Previous", "Next" function. Come ~!

4, Link1.txt

1.ASP ASP Programming Introduction (1) 2.ASP ASP Programming Introduction (2) 3.ASP ASP Programming Introduction (3) 4.ASP ASP Programming Introduction (4)

The main function is to set text and connection

5, link1.inc

<% Set nextlink = server.createObject ("mswc.nextlink") response.write "Current article index number" & nextLink.getListIndex ("link1.txt") & "
" response.write "last chapter Title: "& nextLink.getPReviousDescription (" Link1.txt ") &"
"Response.write" Next chapter: "& nextLink.getNextDescription (" link1.txt ") &"
"count = NextLink.getListCount ("Link1.txt") response.write " "response.write" " response.write "&" Next chapter "&" "response.write "&" The last chapter "&"
"%>

GetListCount displays the number of files that are included in the component. GetListIndex displays the front-rear position index value of the current page in these connection files. GetNextDescription Displays the next description of the connection file.

GetNextURL Displays the URL address of the next file in the connection file. GetNTHDESCRIPTION (Target File Name, N) Displays a description of the Nth page in the connection file.

GetNThurl (target file name, n) displays the file URL address of the Nth page in the connection file.

GetNThurl (target file name, n) displays the file URL address of the Nth page in the connection file.

GetPReviousDescription (Target File Name) Displays a description of the previous file in the connection file.

GetPreviousURL (Target File Name) Displays the URL address of the previous file in the connection file.

转载请注明原文地址:https://www.9cbs.com/read-36319.html

New Post(0)