206 lines
7.3 KiB
HTML
206 lines
7.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
|
|
<TITLE>Content Linking Component</TITLE>
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
<!--
|
|
TempString = navigator.appVersion
|
|
if (navigator.appName == "Microsoft Internet Explorer"){
|
|
// Check to see if browser is Microsoft
|
|
if (TempString.indexOf ("4.") >= 0){
|
|
// Check to see if it is IE 4
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
}
|
|
}
|
|
else if (navigator.appName == "Netscape") {
|
|
// Check to see if browser is Netscape
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
//-->
|
|
</script>
|
|
<SCRIPT LANGUAGE="VBScript">
|
|
<!--
|
|
Sub Window_OnLoad()
|
|
Dim frmContents
|
|
On Error Resume Next
|
|
If Not Parent Is Nothing Then
|
|
Set frmContents = Parent.Contents
|
|
If Not frmContents Is Nothing Then
|
|
frmContents.Window.TOCSynch_Click
|
|
End If
|
|
End If
|
|
End Sub
|
|
//--></SCRIPT><META NAME="DESCRIPTION" CONTENT="Internet Information Services reference information">
|
|
<META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'>
|
|
<META NAME="MS.LOCALE" CONTENT="EN-US">
|
|
<META NAME="MS-IT-LOC" Content="Internet Information Services">
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
|
|
<H1><A NAME="_content_linking_component"></A><SUP></SUP>Content Linking Component</H1>
|
|
|
|
<P>The Content Linking component creates a <B>Nextlink</B> object that manages a list of URLs so that you can treat the pages in your Web site like the pages in a book. You can use the Content Linking component to automatically generate and update tables of contents and navigational links to previous and subsequent Web pages. This is ideal for applications such as online newspapers and forum message listings. </P>
|
|
|
|
<P>The Content Linking component references a Content Linking List file that contains the list of the linked Web pages. This list is stored on the Web server.</P>
|
|
|
|
<H6>File Names</H6>
|
|
|
|
<TABLE border=0 cellpadding=5 cols=2 frame=box rules=all>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=31%>Nextlink.dll </TD>
|
|
<TD width=69%>The Content Linking<B> </B>component</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=31%><A HREF="/iishelp/iis/htm/asp/comp39lx.htm">Content Linking List File</A></TD>
|
|
<TD width=69%>A text file that contains a list of Web pages in the order in which they should be displayed. This file must be available on a Web server virtual path.</TD>
|
|
</TR>
|
|
</TABLE><BR>
|
|
|
|
<H6>Syntax</H6>
|
|
|
|
<P><B>Set </B><I>NextLink</I> <B>= Server.CreateObject( "MSWC.NextLink" )</B></P>
|
|
|
|
<P><B> </B></P>
|
|
|
|
<H6>Parameters</H6>
|
|
|
|
<DL>
|
|
<DT><I>NextLink </I></DT>
|
|
|
|
<DD>Specifies the name of the object created by the call to <B>Server.CreateObject</B>.</DD>
|
|
</DL>
|
|
|
|
<H6>Methods</H6>
|
|
|
|
<TABLE border=0 cellpadding=5 cols=2 frame=box rules=all>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp8xv8.htm">GetListCount</A></TD>
|
|
<TD width=66%>Counts the number of items linked in the Content Linking List file.</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp9dq0.htm">GetListIndex</A></TD>
|
|
<TD width=66%>Gets the index of the current page in the Content Linking List file.</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp7cby.htm">GetNextDescription</A></TD>
|
|
<TD width=66%>Gets the description of the next page listed in the Content Linking List file.</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp34a4.htm">GetNextURL</A></TD>
|
|
<TD width=66%>Gets the URL of the next page listed in the Content Linking List file.</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp2wby.htm">GetNthDescription</A></TD>
|
|
<TD width=66%>Gets the description of the <I>N</I>th page listed in the Content Linking List file.</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp8oa4.htm">GetNthURL</A></TD>
|
|
<TD width=66%>Gets the URL of the <I>N</I>th page listed in the Content Linking List file.</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp1j8u.htm">GetPreviousDescription</A></TD>
|
|
<TD width=66%>Gets the description line of the previous page listed in the Content Linking List file.</TD>
|
|
</TR>
|
|
|
|
<TR VALIGN="top">
|
|
<TD width=34%><A HREF="/iishelp/iis/htm/asp/comp0ir0.htm">GetPreviousURL</A></TD>
|
|
<TD width=66%>Gets the URL of the previous pages listed in the Content Linking List file.</TD>
|
|
</TR>
|
|
</TABLE><BR>
|
|
|
|
<H6>Example</H6>
|
|
|
|
<PRE>The following example builds a table of contents. To run this example, you need to create the <U>Content Linking List File</U> in your Default Web Site folder, in a subfolder called <B>Data</B>. For example, if your Default Web Site is mapped to C:\Inetpub\Wwwroot, you need to create the list file in C:\Inetpub\Wwwroot\Data\NextLink.txt.</PRE>
|
|
|
|
<P>--- NextLink.asp ---</P>
|
|
|
|
<PRE><CODE><%
|
|
Set NextLink = Server.CreateObject("MSWC.NextLink")
|
|
ListFile = "/data/nextlink.txt"
|
|
count = NextLink.GetListCount(ListFile)
|
|
I = 1
|
|
%>
|
|
<UL>
|
|
<% Do While (I <= count) %>
|
|
<LI>
|
|
<A HREF="<%=NextLink.GetNthURL(ListFile, I)%>">
|
|
<%= NextLink.GetNthDescription(ListFile, I) %>
|
|
</A>
|
|
</LI>
|
|
<% I = (I + 1) %>
|
|
<% Loop %>
|
|
</UL>
|
|
<!-- #include FILE = "nextlink.inc" -->
|
|
|
|
</CODE></PRE>
|
|
|
|
<P>The following script adds next-page and previous-page links to any ASP file. Include this file in every file listed in your <U>Content Linking List File</U> using the following line:</P>
|
|
|
|
<P><!-- #include FILE = "nextlink.inc" --></P>
|
|
|
|
<P>--- NextLink.inc ---</P>
|
|
|
|
<PRE><CODE><BR>
|
|
<%
|
|
Set NextLink = Server.CreateObject ("MSWC.NextLink")
|
|
ListFile = "/data/nextlink.txt"
|
|
Index = NextLink.GetListIndex(ListFile)
|
|
%>
|
|
|
|
<TABLE BORDER=0 CELLPADDING=6>
|
|
<TR><TD>
|
|
|
|
<% If (Index > 1) Then %>
|
|
<A HREF="<%=NextLink.GetPreviousURL(ListFile)%>">
|
|
Previous Page
|
|
</A>
|
|
<% Else %>
|
|
Previous Page
|
|
<% End If %>
|
|
|
|
</TD><TD>
|
|
|
|
<% If 0 = Index Then %>
|
|
<A HREF="<%=NextLink.GetNthURL(ListFile, 1)%>">
|
|
Next Page
|
|
</A>
|
|
<% ElseIf (Index < NextLink.GetListCount(ListFile)) Then %>
|
|
<A HREF="<%=NextLink.GetNextURL(ListFile)%>">
|
|
Next Page
|
|
</A>
|
|
<% Else %>
|
|
Next Page
|
|
<% End If %>
|
|
|
|
</TD><TD>
|
|
|
|
<% If Not 0 = Index Then %>
|
|
<A HREF="nextlink.asp">
|
|
Back to Table of Contents
|
|
</A>
|
|
<% End If %>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
</CODE></PRE>
|
|
<hr class="iis" size="1">
|
|
<p align="center"><em><a href="../../../common/colegal.htm">© 1997-2001 Microsoft Corporation. All rights reserved.</a></em></p>
|
|
</BODY>
|
|
</HTML>
|