Forum Moderators: phranque

Message Too Old, No Replies

How do I make a section menu?

I want pages 2 say: Home --> Widget info --> Blue Widgets

         

uhwebs

10:47 pm on Sep 4, 2005 (gmt 0)

10+ Year Member




I've seen some larger sites that, across the top of the page, will have a menu that shows what section and sub section of the site you're in.

It will say something like:
You are here: Home -> Widgets -> Widget care -> Widget Food
or Home -> Widjetts -> Widjett care -> Widjett Food

for the different sections. How do I do this? It would be neat to have at the top of a page. As I already have 300+ pages I would hate to go through and change them individually... I wonder how people set their sites up like this.

zulu_dude

10:12 am on Sep 5, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



You need to look for something called a 'breadcrumb' script. There are some free ones available for most of the big scripting languages.

Unfortunately (unless you're using templates) you're going to have to edit each of your 300 pages :-(

Although you could look on the bright side and see it as an opportunity to move to templates before your site reaches 600 pages! Once you've changed to templates, all your future updates will become much easier as well...

html_help

7:10 am on Sep 6, 2005 (gmt 0)

10+ Year Member



<a href="link">Home</a><span class="style2"> ¦ </span><a href="link">Widget Info</a> <span class="style2"> ¦ </span> <a href="link">Blue Widget</a><span class="style2"> ¦ </span><a href="Widget Care">Widget Care</a><span class="style2"> ¦ </span><a href="Widget Food">Widget Foot</a> <span class="style2"> ¦ </span>

Hi go to your notepad or something copy paste this in there and then save it .html and then view it and tell me if this what your looking for m8

html_help

9:35 am on Sep 6, 2005 (gmt 0)

10+ Year Member



place thgis code into a text editor and save it as crumb.js

function breadcrumbs(){
sURL = new String;
bits = new Object;
var x = 0;
var stop = 0;

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[i] + "/\">" + bits[i] + "</a> > ";
}
document.write(output + document.title);

then place this code into a blank text editor
<html>
<head>
<script language="JavaScript" src="crumb.js"></script>

<script language="JavaScript">
<!--
breadcrumbs();
-->
</script>

<a href="put links here">home</a> /
<a href="put links here">js</a> /
<a href="put links here">breadcrumbs</a>

and save it as anything you want called with the extension .html

good luck i hope that help and that is what your looking for