We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37380
    • 20 Posts
    @Ben

    And works!

    FYI: Documentation indicates it's true/false parameter value instead.
    http://rtfm.modx.com/display/ADDON/BreadCrumb
    (Next time I'll check out the actual code too)

    Thanks much for your quick response! smiley
      • 34078
      • 76 Posts
      You're right. Doc can be confusing. It's fixed ! wink
        • 1829
        • 15 Posts
        Thanks for the snippet!

        I think it's better to generate breadcrumbs urls considering the link_tag_scheme param.

        Line 129:
        $link = $modx->makeUrl($resource->get('content'), '', '', $modx->getOption('link_tag_scheme'));

        Line 138:
        $link = $modx->makeUrl($resource->get('id'), '', '', $modx->getOption('link_tag_scheme'));
          • 39448
          • 8 Posts
          So I think I found a bug. I am transitioning from Breadcrumbs to BreadCrumb.

          This is my Breadcrumbs code:
          [[Breadcrumbs? &respectHidemenu=`0` &crumbSeparator=`` currentAsLink=`false` &showHomeCrumb=`0` &titleField=`bc-title`]]


          This is my BreadCrumb code:
          [[BreadCrumb? showHidden=`0` showBreadCrumbAtHome=`0`]]


          I am trying to mimic the titleField portion in my BreadCrumbLinkCrumbTpl and my BreadCrumbCurrentCrumbTpl using (so if bc-title is empty, rollback to pagetitle):
          <li><a href="[[+link]]">[[*bc-title:empty=`[[+pagetitle]]`]]</a></li>


          It works great on BreadCrumbCurrentCrumbTpl, but on BreadCrumbLinkCrumbTpl it is only showing pagetitle, not bc-title first. It's almost like it can't traverse? Thoughts? [ed. note: jvendryes last edited this post 11 years, 10 months ago.]
            • 37380
            • 20 Posts
            I'm with antonlemon. I had to do the same hack myself.
            Other snippets such as wayfinder have it already incorporated by letting you choose the &scheme type.
            Thanks both smiley
              • 34078
              • 76 Posts
              Oh boy, I missed some posts here ! laugh


              @antonlemon, @oriolsabate
              You're totally right. I'll fix this today.

              @jvendryes
              I presume bc-title is a TV ? So you have to use getResourceField to retrieve that field :
              <li><a href="[[+link]]">[[getResourceField:empty=`[[+pagetitle]]`? &id=`1` &field=`bc-title` & isTV=`1`]]</a></li>
                • 34078
                • 76 Posts
                @antonlemon, @oriolsabate
                &scheme property added in BreadCrumb 1.2.0-pl : http://modx.com/extras/package/breadcrumb
                If &scheme property isn't defined, the modx link_tag_scheme setting will be used.
                  • 37380
                  • 20 Posts
                  Thanks Ben for your quick response & fix. Works great!
                    • 34078
                    • 76 Posts
                    BreadCrumb 1.3.0-pl released : http://modx.com/extras/package/breadcrumb

                    BreadCrumb snippet now works with property sets and templates chunks have been removed and replaced by properties.

                    Besides template can be chunk name, files path ( @FILE: ) or chunk code ( @CODE: )
                      • 29589
                      • 2 Posts
                      Ben, thanks for this. Wonderfully simple.

                      -- TG