Vi kan även köra längre med Content Linking. En metod som är möjlig är följande
Ibland vill man visa biler ibland vill man visa text.
Detta är möjligt genom att lägga till namnet på en bildfil efter förklaringstexten. För att skilja på
texten och bildfilen kan man t.ex. använda | tecknet. Resultatet blir då följande
sid1.asp Min första sida|bild1.gif
sid2.asp Min andra sida|bild2.gif
sid3.asp Min tredje sida|bild3.gif
sid4.asp Min fjärde sida|bild4.gif
sid5.asp Min femte sida|bild5.gif
<%
Function texten( description )
Dim lineInd
lineInd = InStr( description, "|" )
if lineInd > 0 Then
texten = Left( description , lineInd - 1 )
else
texten = description
End If
End Function
Function bilden( description )
Dim lineInd
lineInd = InStr ( description, "|" )
if lineInd > 0 Then
bilden = "<IMG SRC=""" & _
Mid( description , lineInd + 1 ) & _
""" ALT="""& _
Left( description , lineInd - 1 ) & _
""" BORDER=""0"">"
else
bilden = description
End If
End Function
%>
<a href="<% =navList.GetNthURL ( listFile , row ) %>">
<% = texten( navList.GetNthDescription ( listFile , row ) ) %>
<% =bilden( navList.GetNthDescription ( listFile , row ) ) %>
</a>
Ett annat exempel
<% =bilden ( "Min första sida|../images/1.gif" ) %>
<% = texten ( "Min första sida|../images/1.gif" ) %>
ger

Min första sida