Basic Breadcrumbs:
Click here
to test this script.
Code:
default.asp
Highlight
<%option explicit%> <% Dim PageTitle PageTitle = "About Us" %> <%=buildBreadCrumbs(Request.ServerVariables("PATH_INFO"))%> <% Function buildBreadCrumbs(FullPath) Dim Letters Dim tmpPath Dim strTmpPath Dim DirPath Dim firstLetter Dim Letter Do Until instr(1,FullPath,"/") = 0 Letters = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z") tmpPath = mid(FullPath,1,instr(1,FullPath,"/")-1) strTmpPath = Trim(tmpPath) DirPath = DirPath & strTmpPath & "/" firstLetter = ucase(mid(strTmpPath,1,1)) strTmpPath = firstLetter & mid(strTmpPath,2,len(strTmpPath)) for each letter in letters strTmpPath = Replace(Trim(strTmpPath),"_" & lcase(letter)," " & UCase(letter)) next FullPath = mid(FullPath,instr(1,FullPath,"/")+1,Len(FullPath)-Len(tmpPath)) if strTmpPath = "" then buildBreadCrumbs = "
Home Page
" elseif strTmpPath = "Home" then else buildBreadCrumbs = buildBreadCrumbs & " >
" & strTmpPath & "
" end if Loop if PageTitle <> "" then buildBreadCrumbs = buildBreadCrumbs & " : " & PageTitle end if End Function %>