<%@Language = VBScript %> <% Option Explicit %> <% '################################ '#FILE: popcorn_basic.asp - Version 1.2 '#REVISION HISTORY: '# 05/29/04 Version 1.2 No changes. Just keeping up with release numbers '# to other versions of this script. '# 02/22/02 Version 1.0 '# '#CONTACT INFORMATION: '# http://www.davelozinski.com/cgi-bin/email_lozinski.pl '# '#UPGRADE TO THE ADVANCED VERSION: '# http://www.davelozinski.com/scripts/popcorn_trail/ '# '# This asp script generates a "popcorn" trail on your web page. '################################ '# Just insert this code once at the top of the web page you'd like the '# "popcorn" trail displayed in Dim trail, path, x, UpperBound trail = Array() trail = Split(Request.ServerVariables("URL"),"/") UpperBound = UBound(trail) '################################ %> Basic Popcorn Trail Test
There should be a popcorn trail below:

<% '################################ '# Insert this code wherever you want your "popcorn" trail displayed For x = 1 to (UBound(trail) - 1) path = path & "/" & trail(x) Response.Write("-> " & trail(x) & " ") Next '################################ %>

Like this script?
Go to: http://www.davelozinski.com/scripts/popcorn_trail/ and upgrade to the "Advanced" version with the following features:

Customize directory and file names!
In the "basic" version, items in the trail are listed as they're spelled on your server.
In the "advanced" version, tell the program who you want the items in your "trail" named!

For example:
-> Home -> Scripts -> Popcorn Trail -> Popcorn Code
in place of:
-> / -> asp_scripts -> popcorn -> popcorn_code.asp

Easily Specify Multiple Trails with Multiple Settings on the same page or multiple pages with only ONE copy of the code!
At the top of your page, you might have your trail look like:
-> Home -> Scripts -> Popcorn Trail -> Popcorn Code
At the bottom of the page, you might have a different view such as:
Home | Scripts | Popcorn Trail | Popcorn Code

Have your trail end at the last directory OR actual file calling the code!
Do you want your trail to extend to the file currently being viewed? Or just the last directory? Easily set this for each trail!
For example:
/ -> asp_scripts -> popcorn -> popcorn_code.asp
OR
/ -> asp_scripts -> popcorn

Have multiple trails, each with its own "separator", including images!
You can use the default trail item separator of "->", or specify your own! And you can have a different separator for each trail on your page!

For example:
Home -> Scripts -> Popcorn Trail -> Popcorn Code
AND
Home | Scripts | Popcorn Trail | Popcorn Code

Have the trail separator start before OR after the first item!
For example:
-> Home -> Scripts -> Popcorn Trail -> Popcorn Code
OR
Home -> Scripts -> Popcorn Trail -> Popcorn Code