Name
GetPreviousURL —
objNextLink
.
GetPreviousURL(
strContentLinkList
)
Synopsis
Returns a string containing the URL entry of the previous document listed in the Content Linking list.
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
<%
' Dimension local variables.
Dim objNextLink
Dim strPrevDesc
Dim strPrevURL
' Create an instance of the NextLink object.
Set objNextLink = Server.CreateObject("MSWC.NextLink")
' Retrieve a description text for the previous item in
' the Content Linking list file.
strPrevDesc = _
objNextLink.GetPreviousDescription("/MyContentLinkList.txt")
' Retrieve a URL for the previous item in the Content
' Linking list file.
strPrevURL = _
objNextLink.GetPreviousURL("/MyContentLinkList.txt")
' Use strNextURL to create a link to the item whose
' description you retrieved using GetPreviousDescription.
%>
<A HREF = "<%= strPrevURL %>"><%= strPrevDesc%></A>
<%
' Free the memory consumed by the NextLink object.
Set objNextLink = Nothing
%>
. . . [additional HTML and code]Notes
If the current page cannot be found in the Content Linking list file, the URL text for the first item in the list file is returned by default.
Using GetPreviousURL with a Content Linking file, you do not have to change the code within your HTML to update a "PREVIOUS PAGE" hyperlink, for example. ...
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