Skip to main content
Inspiring
January 30, 2008
Question

Breadcrumbs

  • January 30, 2008
  • 4 replies
  • 2009 views
I would like to use ColdFusion to add dynamic breadcrumbs to my site. Does anyone know what is the best way to do this?

For example, if I'm at www.mysite.com/about/privacy.cfm. I'd like to display

Home > About > Privacy Policy

at the top of the page.

Thanks.
    This topic has been closed for replies.

    4 replies

    natg504Author
    Inspiring
    January 31, 2008
    Thanks, jdeline. That is what I was asking.
    James Moberg
    Inspiring
    October 10, 2021

    Is your content generated from a database using a child/parent relationship?

     

    For database hierarchies, we've used CF_BranchUp and CF_GetBranch custom tags.  These tags were both written by Michael Cannon-Brookes (from Atlassia / MikesBox.org) and were licensed under the GNU General Public License by Rob Bilson in 1998. I can't find them available anywhere online at the moment.

    BKBK
    Brainiac
    October 11, 2021

    1998 - seriously?

    Inspiring
    January 31, 2008
    have you even looked at it? it is pure cf.

    ---
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com
    January 31, 2008
    natg504 - the user-defined function (UDF) is written in ColdFusion script. It looks a lot like javascript, but as Azadi says, it is pure ColdFusion and therefore processed on the server.
    natg504Author
    Inspiring
    January 31, 2008
    Thanks. Is this using javascript? I'm wondering if it works if the user has javascript turned off. I've read that it's best not to javascript for that reason, so I was looking for a CF solution.
    Inspiring
    January 31, 2008
    this may help get you started:
    http://www.cflib.org/udf.cfm?ID=1186

    it is far from perfect, but it can give you an idea how to d it and you
    can work from there

    ---
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com
    Known Participant
    October 10, 2021

    Hello

    The "http://www.cflib.org/udf.cfm?ID=1186" is longer existed.

    You know any other sources on how to build a breadcrum please?

    Thank you

    James Moberg
    Inspiring
    October 10, 2021

    I found the breadCrumbs() UDF on Archive.org and resurrected it (and updated it) as a gist here.
    https://gist.github.com/JamoCA/6436ceb8f70eb50f83102da339ab9bfe
    (NOTE: Due to Adobe Terms, I don't share CFML code on Adobe Forums anymore.)