Name
GetListIndex —
objNextLink
.
GetListIndex(
strContentLinkList
)
Synopsis
Returns an integer containing the position (starting with position 1) of the current item in the Content Linking list. You can use this method to determine if you are at the last item in the content linking list or if there are more items to which to navigate.
Parameters
-
strContentLinkList A string value representing the virtual or relative pathname and filename of your Content Linking file. You cannot use physical paths or absolute URLs (those beginning with http://, //, or \\) for this parameter.
Example
<HTML>
<HEAD>
<TITLE>Document List</TITLE>
<BODY>
<%
' Dimension local variables.
Dim objNextLink
Dim intCurrentPos
' Create an instance of the NextLink object.
Set objNextLink = Server.CreateObject("MSWC.NextLink")
' Retrieve a position of the current page listed in
' the Content Linking list file.
intCurrentPos = _
objNextLink.GetListIndex("/Content/MyContentLinkList.txt")
' In this instance, calling GetListIndex will return the
' number 1 if this page is in the content linking list.
' Otherwise, it will return 0.
' Free the memory consumed by the NextLink object.
Set objNextLink = Nothing
%>
. . . [additional code]Notes
The return value is zero (0) if the current page is not in the Content Linking list file.
In addition to the previous example, see the full example at the end of this chapter.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access