Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
Jon102 #1
Breadcrumbs?
I'm trying to implement a breadcrumbs trail through my site and am using the
code detailed below. This works fine but I have a couple of questions:
Is it possible to to get the script to look for another file in a directory
other than the index (like the only file in there for instance). If so how?
Also is it possible to skip a directory for example: I have a folder called
pages with other folders called section1 and section2 etc inside this pages
folder. I don't want the breadcrumbs to display a link to the pages folder
because there is nothing in it other than more folders, is it possible to omit
this link form the breadcrumbs trail. I hope this makes sense.
Any help would be much appreciated. Cheers.
function breadcrumbs(){
sURL = new String;
bits = new Object;
var x = 0;
var stop = 0;
var output = "<A HREF=\"/\">Home</A> | ";
sURL = location.href;
sURL = sURL.slice(8,sURL.length);
chunkStart = sURL.indexOf("/");
sURL = sURL.slice(chunkStart+1,sURL.length)
while(!stop){
chunkStart = sURL.indexOf("/");
if (chunkStart != -1){
bits[x] = sURL.slice(0,chunkStart)
sURL = sURL.slice(chunkStart+1,sURL.length);
}else{
stop = 1;
}
x++;
}
for(var i in bits){
output += "<A HREF=\"";
for(y=1;y<x-i;y++){
output += "../";
}
output += bits + "/\">" + bits + "</A> | ";
}
document.write(output + document.title);
}
Jon102 Guest
-
Kaosweaver Breadcrumbs
I have been using the Kaosweaver Breadcrumbs script on my new site which works great. The only problem is that when I validate the page for W3C... -
Dynamic Breadcrumbs question
Hi, I am trying to implement this dynamic breadcrumbs script: http://www.macromedia.com/devnet/dreamweaver/articles/breadcrumbs.html The article... -
Breadcrumbs
Could someone please give me some suggestions about including breadcrumbs, or something like, on a website. The site is static, and I do not have... -
Alexandro Colorado #2
Re: Breadcrumbs?
You might want to check our new product: MX Breadcrums
[url]http://www.interaktonline.com/Products/Free-Products/MXBreadcrumbs/Overview/[/url]
On Wed, 6 Oct 2004 11:37:00 +0000 (UTC), Jon102
<webforumsuser@macromedia.com> wrote:
> I'm trying to implement a breadcrumbs trail through my site and am using
> the
> code detailed below. This works fine but I have a couple of questions:
>
> Is it possible to to get the script to look for another file in a
> directory
> other than the index (like the only file in there for instance). If so
> how?
>
> Also is it possible to skip a directory for example: I have a folder
> called
> pages with other folders called section1 and section2 etc inside this
> pages
> folder. I don't want the breadcrumbs to display a link to the pages
> folder
> because there is nothing in it other than more folders, is it possible
> to omit
> this link form the breadcrumbs trail. I hope this makes sense.
>
> Any help would be much appreciated. Cheers.
>
>
> function breadcrumbs(){
> sURL = new String;
> bits = new Object;
> var x = 0;
> var stop = 0;
> var output = "<A HREF=\"/\">Home</A> | ";
>
> sURL = location.href;
> sURL = sURL.slice(8,sURL.length);
> chunkStart = sURL.indexOf("/");
> sURL = sURL.slice(chunkStart+1,sURL.length)
>
> while(!stop){
> chunkStart = sURL.indexOf("/");
> if (chunkStart != -1){
> bits[x] = sURL.slice(0,chunkStart)
> sURL = sURL.slice(chunkStart+1,sURL.length);
> }else{
> stop = 1;
> }
> x++;
> }
>
> for(var i in bits){
> output += "<A HREF=\"";
> for(y=1;y<x-i;y++){
> output += "../";
> }
> output += bits + "/\">" + bits + "</A> | ";
> }
> document.write(output + document.title);
> }
>
--
Alexandro Colorado
------------------------------
Support Engineer
InterAKT Online
[url]http://www.interaktonline.com[/url]
Tel: 40(21) 312.5312
Alexandro Colorado Guest



Reply With Quote

