We use one that I found on the devex under cf_breadcrumb.  Note that we did
some minor revisions to make it suit our needs.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<cfsetting enablecfoutputonly="Yes">
<!---
############################################################################
#
#
# Template: CF_BreadCrumb version 1.0
#
# Author: Bruce Heerssen
#
# Date: Jan 04, 2001
#
# Last Modified: Jan 11, 2001
#
#
#
#              ---------------------- NOTICE ---------------------
#
#
#
# Copyright 2001, Bruce Heerssen
#
#
#
# This script is provided under the GNU Public liscense and is therefore
#
# "freeware". You are free to modify this code and use it in any way you see
#
# fit, with the following execptions:
#
#
#
#      If you would like to redistribute this code as a complete product,
please #
#      leave this notice in place and do not claim this code as your own
work.   #
#
#
#      Also,  please notify the author of any changes you make to the code
#
#      before redistribution.
#
#
#
#              --------------- Standard Disclaimer ---------------
#
# Although this code has been tested and should present no problems, users
#
# should be aware that this code does not come with any guarantee of fitness
or  #
# suitablility for any purpose, expressly stated or otherwise. By using this
#
# code, you agree that you will not hold Bruce Heerssen resposible or liable
for #
# any damage or liability incurred in the use of this code. Use at your own
#
# risk. As with all new code, be sure to test this tag in a NON-production
#
# environment BEFORE placing it on your production servers.
#
#
#
# If you have any questions, comments or complaints, please feel free to
contact #
# me at [EMAIL PROTECTED]
#
#
#
# Thank you,
#
#     Bruce Heerssen
#
############################################################################
# --->
<cfparam name="attributes.name" default="">
<cfparam name="attributes.class" default="">
<cfparam name="attributes.target" default="">
<cfparam name="attributes.onclick" default="">
<cfparam name="attributes.onmouseover" default="">
<cfparam name="attributes.onmouseout" default="">
<cfparam name="attributes.title" default="">
<cfparam name="attributes.symbol" default=" &gt; ">
<cfparam name="attributes.enableLinks" default="yes">
<cfscript>
variables.outputStr = "";
variables.pathList = cgi.script_name;
variables.listLength = listLen(variables.pathList, "/");
variables.elementUrl = "";
variables.counter = 0;
while (variables.counter lt variables.listLength) {
 variables.counter = variables.counter + 1;
 variables.thisElement = listGetAt(variables.pathList, variables.counter,
"/");
 variables.elementLength = len(thisElement);
 variables.elementName = ucase(left(variables.thisElement, 1)) &
lcase(right(variables.thisElement, variables.elementLength - 1));
 //replace the underscores with spaces
 variables.elementName = replace(variables.elementName, "_", " ", "ALL");
 variables.elementUrl = listAppend(variables.elementUrl,
variables.thisElement, "/");
 variables.outputStr = variables.outputStr & "<a";
 if (len(attributes.name)) {
  variables.outputStr = variables.outputStr & ' name="#attributes.name#"';
  }
 if ((attributes.enableLinks is 'yes') AND (len(attributes.title) and
counter eq variables.listLength)){
  variables.outputStr = variables.outputStr &
'href="/#lcase(variables.elementUrl)#"';
  } else {
  variables.outputStr = variables.outputStr & '
href="/#lcase(variables.elementUrl)#"';
  }
 if (len(attributes.class)) {
  variables.outputStr = variables.outputStr & ' class="#attributes.class#"';
  }
 if (len(attributes.target)) {
  variables.outputStr = variables.outputStr & '
target="#attributes.target#"';
  }
 if (len(attributes.onclick)) {
  variables.outputStr = variables.outputStr & '
onclick="#attributes.onClick#"';
  }
 if (len(attributes.onmouseover)) {
  variables.outputStr = variables.outputStr & '
onmouseover="#attributes.onmouseover#"';
  }
 if (len(attributes.onmouseout)) {
  variables.outputStr = variables.outputStr & '
onmouseout="#attributes.onmouseout#"';
  }
 if (len(attributes.title) and counter eq variables.listLength)  {
  /* if you want to show the current page in the breadcrumb, remove comments
from this line and place them around the one below
  variables.outputStr = variables.outputStr &
">#lcase(attributes.title)#</a>"; */
  variables.outputStr = variables.outputStr & "></a>";
  } else {
  variables.outputStr = variables.outputStr &
">#lcase(variables.elementName)#</a>";
  }
 if (counter lt variables.listLength) {
  if (len(attributes.symbol)) {
   if (len(attributes.class)) {
    variables.outputStr = variables.outputStr & '<a
class="#attributes.class#">#replace(attributes.symbol, "_", " ",
"ALL")#</a>';
    } else {
    variables.outputStr = variables.outputStr & "<a>" & attributes.symbol &
"</a>";
    }
   }
  }
 }
</cfscript>
<cfoutput>#variables.outputStr#</cfoutput>
<cfsetting enablecfoutputonly="No">


----- Original Message -----
From: "Luis Lebron" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, January 30, 2003 2:16 PM
Subject: RE: Breadcrumb navigation CF Tutorial


> I'm thinking we are going to used directory based file location.
>
>
> Luis
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to