Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Breadcrumbly

Status
Not open for further replies.

hotmailisforloosers

Programmer
Jun 22, 2004
25
US
I'm trying to put breadcrumb navigation at the top of a site, and ordinarily it would be a simple enough task, but on this site it's just a pain in the butt.

So I have a wonderful function that creates a breadcrumb navigation bar based on folder names... but the site isn't organized in any kind of way that would work with that, and is so large that it would be a huge trouble to try and modify the organization to get it to work right....... I've tried, and it just throws too many things out of wack to even get into... static links, dynamic links, all get screwed up and the breadcrumb doesn't even work most of the time because it sends to the wrong place with dynamic pages.

This site has content pages that are static, and it has content pages that are dynamically created, and they're all blended around in ways that I can't understand what the heck the original developer was thinking. Most all the dynamic pages come from a folder called "articles," so any time you hit those dynamic bastards the breadcrumb drops back to that folder, rather than showing the logical organization of the site.

So I'm left wondering what I should even try... I don't want to totally reorganize the site because that would force me to get into some pretty heavy work, and force the client to modify all dynamic page links to fit the new organization..... and they wouldn't know where to be linking to anyway.............. so what should I try to do to get a logical breadcrumb navigation on the site?... Should I try something really ugly using a database or what?
 
Hi there.

Actually, I'm not very versed in breadcrumb navigation practices, but:
How 'bout a public dynamic array, where you store the respective URL and/or page title in? This way, you wouldn't even have to "know", where the doc is saved at, you just store its URL.

Cheers,
MakeItSo
 
That sounds good..... any resources to look into that?... or maybe you can just get me started on how to do it? :)
 
Resource:

Some first idea:

In your top page, you could use two session variables:
Code:
<%
...
Dim hist,i, breadcrumb
hist=array(1)
session("current")=window.[i]main frame[/i].Location
if session("current")<>session("prev") then 'different page loaded?
  i=ubound(hist)
  i=i+1  
  redim preserve hist(i)
  hist(i)=session("current")
  session("prev")=session("current")
end if
for i = 0 to ubound(hist)
  breadcrumb=breadcrumb & "->" & hist(i)  'create navigation list string
next
response.write breadcrumb
...
%>

Never tried this, though. ;-)

Hope this helps,
MakeItSo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top