Breadcrumbs

  • Thread starter frontpagecustoms.com
  • Start date
F

frontpagecustoms.com

I am looking for a simple way to handle a breadcrumb trail for
navigation. Is there a simple way to do this in FP2003?
 
M

Mike Mueller

Can't tell you about FP03, but if you upgrade to Expressions
Web (<$100 for the upgrade) AND you are on an ASPX-2 server-
it's all included


:I am looking for a simple way to handle a breadcrumb trail
for
: navigation. Is there a simple way to do this in FP2003?
:
 
T

Thomas A. Rowe

FP doesn't have any built-in support for this.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
T

Tom Willett

You would need to add a script. Google for breadcrumbs script and you'll
come up with many.
--
===
Tom Willett
Microsoft MVP - FrontPage
---
FrontPage Support:
http://www.frontpagemvps.com/
===
|I am looking for a simple way to handle a breadcrumb trail for
| navigation. Is there a simple way to do this in FP2003?
|
 
F

frontpagecustoms.com

Thanks for the feedback. I tried that resources however could not get
it to work. Any other sugguestions?

mark
 
T

Trevor L.

frontpagecustoms.com said:
Thanks for the feedback. I tried that resources however could not get
it to work. Any other sugguestions?

mark

The breadcrumb function I use is below
base is your home site name
defp is the home file

I call it by
<div align="left" id="bcrumbs">
<script type="text/javascript">breadCrumbs();</script>
</div><br />
at the top of each page. (This is actually done by an include.)


function breadCrumbs()
{
// Were passed parameters
var base = 'tandcl.homemail.com.au'
var delStr = '>>'
var defp = 'index.html'
var cStyle = 'sz16'
var tStyle = 'sz16'
var dStyle = 'sz16'
var nl = 0
// added
var localweb = 'myweb'
var bc_text = ''
// ----------------
var loc, subs, a, i

//----Internal functions ---
function getLoc(c)
{
var k, d = ""

if (c > 0)
for (k = 0; k < c; k++)
d += "../"
return d
}
//--------------------------
function makeCaps(a)
{
var l, g = a.split(' ')

for (l = 0; l < g.length; l++)
g[l] = g[l].toUpperCase().slice(0,1) + g[l].slice(1)
return g.join(" ")
}
//-- End Internal functions --

loc = window.location.toString()
if (loc.indexOf('file') != -1)
base = loc.substring(0, loc.indexOf(localweb) + localweb.length + 1)
subs = loc.substr(loc.indexOf(base) + base.length + 1).split("/")

bc_text
= '<a href="' + getLoc(subs.length - 1) + defp + '"'
+ ' class="' + cStyle + '">Home</a>'
+ '<span class="' + dStyle + '">' + delStr + '</span>'

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

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

document.getElementById("bcrumbs").innerHTML = bc_text
}
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------
 

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