Navigation question - breadcrumbs?

B

biztips

I think I need to upgrade the navigation on my site. What I want to
do is at the top of each page put something that says where you are
in the site.

Think it's called breadcrumbs or something...

For example, on this page:
http://www.healthyrecipesforpets.com/cat_food/beefy_goodness.html

You don't know it's a cat food recipe unless I type in (for Cats)
next to the recipe title. It's time-consuming to type that in to
every recipe title. I'd rather have something in small text at the
top of the page that says:

Recipes for Cats > Meals

HOWEVER... I want the easiest way to help users know where they
are. The site has more than 200 recipes! So if I can make some
overall navigation change that'd be wonderful.

Please help, and thanks!

Diana
 
T

Trevor L.

biztips said:
I think I need to upgrade the navigation on my site. What I want to
do is at the top of each page put something that says where you are
in the site.

Think it's called breadcrumbs or something...

The site you quoted doesn't seem to use anything like this

I has an area in a table that says
Site Navigation : Recipe for Dogs
but this seems to be an include

And a lot of the links don't work !!

Have a look at my site if you want to (see my signature)
It uses a script named breadCrumbs()

This is the script
function breadCrumbs()
{
// Were passed parameters
var base = 'tandcl.homemail.com.au'
var delStr = '>>'
var defp = 'index.html'
var cStyle = '75pc'
var tStyle = '75pc'
var dStyle = '75pc'
var nl = 0

//----Internal functions ---
function getLoc(c)
{
var d = ""
if (c > 0)
for (var k = 0; k < c; k++)
d += "../"
return d
}
//--------------------------
function makeCaps(a)
{
var g = a.split(' ')
for (var l = 0; l < g.length; l++)
g[l] = g[l].toUpperCase().slice(0,1) + g[l].slice(1)
return g.join(" ")
}
//--------------------------
var loc = window.location.toString()
var subs = loc.substr(loc.indexOf(base) + base.length + 1).split("/")
document.write
( '<a href="' + getLoc(subs.length - 1) + defp + '"'
+ ' class="' + cStyle + '">Home</a>'
+ '<span class="' + dStyle + '">' + delStr + '</span>')

var a = (loc.indexOf(defp) == -1) ? 1 : 2
for (var i = 0; i < (subs.length - a); i++)
{
subs = makeCaps(unescape(subs))
document.write
( '<a href="' + getLoc(subs.length - i - 2) + defp + '"'
+ ' class="' + cStyle + '">' + subs + '</a>'
+ '<span class="' + dStyle + '">' + delStr + '</span>')
}

if (nl == 1) document.write("<br>")
document.write
( '<span class="' + tStyle + '">'
+ document.title + '</span>' )
}

This is placed at the top of each page
<script type="text/javascript">breadCrumbs();</script><br />&nbsp;

The script used to have parameters passed to it, but I made these internal
variables. You can alter these as you wish

They are
var base = 'tandcl.homemail.com.au' // your home web address
var delStr = '>>' // the separator between page titles
var defp = 'index.html' // your home page
var cStyle = '75pc' // styles for various elements
var tStyle = '75pc' // styles for various elements
var dStyle = '75pc' // styles for various elements
var nl = 0 // newline before last title: 0=no 1 =yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top