Forum Moderators: coopster & phranque

Message Too Old, No Replies

How do you create Breadcrumbs

         

Acternaweb

3:17 pm on Jul 27, 2001 (gmt 0)

10+ Year Member



How do you create breadcrumbs, site like cbssportsline.com use them to give the visitor their trail.

Looks like a nice "eye candy"

Are there scripts out there for use?

sugarkane

4:11 pm on Jul 27, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmmm, not sure what you mean there Acternaweb. I went to the site, didn't see anything out of the ordinary?

Ulrike

4:42 pm on Jul 27, 2001 (gmt 0)



I assume you mean with breadcrumbs these linked navibars top > category > subcategory etc. Yes?

Acternaweb

5:45 pm on Jul 27, 2001 (gmt 0)

10+ Year Member



Yes the "navigation" at the top of the page,
home page --> sports --> football --> article

for example

Thanks,

toadhall

9:03 pm on Jul 30, 2001 (gmt 0)

10+ Year Member



This is PHP. Just add it to the top of your files. I've tested it *fairly* thoroughly. Any problems, let me know in StickyMail.):

<?
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");// always modified
header ("Cache-Control: no-cache, must-revalidate");// HTTP/1.1
header ("Pragma: no-cache");// HTTP/1.0

// Do not add any code above the anticache headers!

$homename = "";
// Add a name for your site's "home" directory (between the double quotes).
// Leave it blank if you don't want it shown.

echo ("<font face=verdana>");

$path = getenv(SCRIPT_NAME);

$mark = "/";
$position = strrpos($path,$mark);
$str = substr($path,1,$position);

$pat ="/";
$arr_str = split($pat,$str);
$count = count($arr_str);

for ($x=0;$x<($count-1);$x++) {
if ($x == 0) {
$url = "$arr_str[$x]/";
}
elseif ($x > 0) {
$url = ("$url" . "$arr_str[$x]/");
}

$linkpath = "$linkpath" . " <font color=gold>></font> ";
$linkpath = "$linkpath" . "<a href=/$url>$arr_str[$x]</a>";
}

if ($homename == "") {
echo ("$linkpath\n\t\t<p>");
} else {
echo ("<a href=\"/\">$homename</a>$linkpath\n\t\t<p>");
}
echo ("</font>");
?>