Crumb trail

Results 1 to 2 of 2

Thread: Crumb trail

  1. #1
    Join Date
    Dec 1969

    Default Crumb trail

    Anyone have a tutorial or any ideas on how to create a crumb trail at the top of the page? I already have a variable declaring each page (varPage = "home")etc. for the navigation on the left so I could use ASP to Keep the Nav Buttons a certain color when they are at that specific page. Do you think I could use the varPage some how for the crumb trail at the top? Sorry this sounds like a stupid question.

  2. #2
    Join Date
    Dec 1969

    Default RE: Crumb trail

    Here&#039;s a thought - but maybe not the best idea - <BR><BR>First, assume that every page has a distinct name.<BR><BR>Store the trail in a session variable as a comma delimited list.<BR><BR>When a new page loads, it checks the trail for its varPage value. If it finds it, it truncates the trail session variable back to that value. If it doesn&#039;t, that means the user is on a child page. So append the varPage value to the session variable.<BR><BR>You can then parse the list apart or do whatever you want to display the crumb trail.<BR><BR>e.g.<BR>-------------<BR>&#060;%<BR> varPage = "About Us"<BR> crumbTrail = session("trail")<BR> pageLocation = instr(crumbTrail, varPage)<BR> <BR> if (pageLocation &#060;&#062; -1)<BR> &#039; truncate session("trail") to end at varPage<BR> crumbTrail = left(crumbTrail, pageLocation + len(varPage))<BR> else<BR> &#039; this page not in the list, so add it<BR> crumbTrail = crumbTrail & "," & varPage<BR> end if<BR><BR> &#039; now reset the session variable<BR> session("trail") = crumbTrail <BR>%&#062;<BR><BR>--- later on in the page<BR>You are here: &#060;%=session("trail")%&#062;<BR>-------------<BR><BR>Am I missing something or would this actually work?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts