Skip to main content
Inspiring
Jan 30, 2008 4:46 PM UTC
Question

Breadcrumbs

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 is closed to new replies. Start a new post to keep the conversation going.

    18 replies

    natg504Author
    Inspiring
    Jan 31, 2008 6:27 PM UTC
    Thanks, jdeline. That is what I was asking.
    Translate
    James Moberg
    Inspiring
    Oct 10, 2021 4:49 PM UTC

    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.

    Translate
    BKBK
    Community Expert
    Community Expert
    Oct 11, 2021 2:31 PM UTC

    1998 - seriously?

    Translate
    Inspiring
    Jan 31, 2008 3:08 PM UTC
    have you even looked at it? it is pure cf.

    ---
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com
    Translate
    Jan 31, 2008 3:41 PM UTC
    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.
    Translate
    natg504Author
    Inspiring
    Jan 31, 2008 1:37 PM UTC
    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.
    Translate
    Inspiring
    Jan 31, 2008 2:35 AM UTC
    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
    Translate
    Known Participant
    Oct 10, 2021 3:22 AM UTC

    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

    Translate
    James Moberg
    Inspiring
    Oct 10, 2021 4:31 PM UTC

    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.)

    Translate