Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. Dynamic Breadcrumbs question
      Hi, I am trying to implement this dynamic breadcrumbs script: http://www.macromedia.com/devnet/dreamweaver/articles/breadcrumbs.html The article...
    3. 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...
  3. #2

    Default 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

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139