We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    This is a great update. There are quite a few new parameters and the templating seems much easier. I like what I see grin I tested it with a very simple setup and it worked great. I will try some of the custom features to see if I catch any bugs, but it looks good so far. Thanks for the great update grin
      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don't know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 13577
      • 302 Posts
      Version 1.0.0 is available

      I killed the last of the most obvious bugs, so I’m releasing this version. Also moving toward a more conventional version numbering system (major.minor.patch).

      This is a complete rewrite, but it shouldn’t give different output by default. However, do test in a safe place first. There are more configuration options and output is templateable. The traditional string, as well as an unordered list template are included - but you can add as many as you like. I don’t have any formal documentation, but I did write out an explanation of configuration variables on my test site. When this has proven stable, I’ll try to move the doc to the wiki.

      Enjoy!
        Standard Disclaimer
        I could be totally wrong.
        • 13577
        • 302 Posts
        1.0.0 Known Issues


        • Breadcrumbs aren’t hidden on home page when showCrumbsAtHome = 0 (default).

        Fixes before 1.0.1
        To fix the showCrumbsAtHome problem, add the following "if" statement under just after the END CONFIGURATION block:
        /* -----------------------------------------------------------------------------
         * END CONFIGURATION
         * -----------------------------------------------------------------------------
         */
        
        // Return blank if necessary: on home page
        if ( !$showCrumbsAtHome && $homeId == $modx->documentObject['id'] )
        {
            return '';
        }


        I’ve fixed this behavior and it will be included in the 1.0.1 release, but would love to know if anyone else has found bugs I could also incorporate.
          Standard Disclaimer
          I could be totally wrong.
          • 13137
          • 204 Posts
          Hello jaredc,

          I found that:
          Use something other than the menutitle (or pagetitle) for the home link.
          and
          Use a custom description.

          Do not seem to be working.

          Also, I don’t know if I just mis-understood the function of this cool snippet, but when I am navigating, for example, from the Home page to Features, then a link from features to a blog post, the crumbs just show "Home » Blog" as apposed to "Home » Features » Blog". Is this normal behavior or am I missing something?
            • 13577
            • 302 Posts
            Correct. Breadcrumbs does NOT show a users click trail as they’ve gone through the site, it shows the path to (or at least towards) the root of the site. From the snippet documentation:
            Quote from: Breadcrumbs

            ...
            * This snippet shows the path through the various levels of site structure. It
            * is NOT necessarily the path the user took to arrive at a given page.
            ...

            Thanks for the tip on the custom home link text and description. I’ve fixed that for 1.0.1 too!
              Standard Disclaimer
              I could be totally wrong.
              • 13577
              • 302 Posts
              Version 1.0.1 available

              Bug fix release:
              - Fixed bug that prevented proper hiding of breadcrumbs on home page when specified
              - Fixed bug preventing use of custom home link text & title
                Standard Disclaimer
                I could be totally wrong.
                • 6726
                • 7,075 Posts
                Thanks Jared, I have rencently noticed the home not being hidden I’ll update !
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 13137
                  • 204 Posts
                  How do you change the "site start"?

                  I have tried "id=" as well as using a title undecided

                  Thanks.
                    • 13577
                    • 302 Posts
                    @islander
                    I’m not entirely sure I understand the question. "Site start" is a MODx configuration parameter set in the manager
                    Tools > configuration

                    Consider this document organization:

                    - Home (1)
                    - English (7)
                    - - Products (2)
                    - - - Widgets (3)
                    - - - - Thing-a-ma-bob (4)
                    - - - - Do-hickey (5)
                    - - - - Ultra Dingle (6)
                    - - - Do-dads [8]
                    - - Services (9)
                    - - Contact (10)
                    - Pig Latin (11)
                    - - Oductspay (12)
                    - - - Idgetsway (13)
                    - - Ervicessay (14)
                    - - Ontactscay (15)
                    - Random page (16)

                    If you are trying to give the "home" link a specific document that is NOT the site_start as defined in your MODx config, then you use the homeId snippet parameter. Let’s say we want "Random page" to be the home breadcrumb:
                    [[Breadcrumbs? &homeId=`16`]]
                    

                    If you’re just trying to get your bread crumbs to stop at a certain place use stopIds. For example, say we didn’t want to go all the way too root, just within our language, we’d put stops at each language root:
                    [[Breadcrumbs? &stopIds=`7,11`]]
                    

                    Since neither of the language roots (7 or 11) are published, if you were on the Ultra Dingle page, you’d get:
                    Home >> Products >> Widgets >> Ultra Dingle
                    If you don’t want that Home link there, then turn it off:
                    [[Breadcrumbs? &showHomeCrumb=`0` &stopIds=`7,11`]]
                    

                    If that doesn’t help, please be more specific about what you’re trying to do, what your relevant document structure looks like, and what snippet calls you’ve tried to make so far.
                      Standard Disclaimer
                      I could be totally wrong.
                      • 25847
                      • 62 Posts
                      @jaredc

                      This is exactly the type of flexibility I was looking to achieve with Breadcrumbs! This seems to be working amazingly well for me. Great work!!!