We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14269
    • 6 Posts
    I’m working on a multilingual site with this structure:

    - Language 1 (id=1)
    -- item a ...
    - Language 2 (id=2)
    -- item b...
    - Language 3 (id=3)
    -- item c...

    The "home" is set to 1 at the Config system

    I have a different template for each language.
    Is there any way to set a different "home" for each language? I mean.. could Breadcrumb snippet start to a page different from the one defined in the config system?

    When you are at item "a" the breadcrumb shows:
    Home > Item a

    But when you are at item "b", it shows:
    Home > Language 2 > item b

    I’d like that breadcrumb will show only
    Home > Item b
    Where "Home" would link to "Language 2"

    Is it possible?

    Thanks

    Jaume
      • 13577
      • 302 Posts
      Hmm...

      When I wrote this (many MANY moons ago), multiple languages were about the farthest thing from my mind! But it seems like what you really want to do is suppress the Home link all together. This is easily accomplished with the parameter:
      [[Breadcrumbs? &showHomeCrumb=`0`]]

      That will produce:

      Language 2 > item b

      I know that’s not exactly what you were looking for... but I think that’s as close as you’ll get with the snippet as it is now.

      I don’t know exactly how your users are selecting their preferred language. But it could work to rename your "language N" pages as "Home." Then with the showHomeCrumb option off, you’ll get a "Home" link - just not the site root Home.
        Standard Disclaimer
        I could be totally wrong.
        • 14050
        • 788 Posts
        jaredc,

        Any plans on making this snippet templateable, similar to wayfinder? Where you use a wrapper class and allow all the html to be stored inside chunks, instead of predefining the html (i.e. <span>) inside the snippet itself?
          Jesse R.
          Consider trying something new and extraordinary.
          Illinois Wine

          Have you considered donating to MODx lately?
          Donate now. Every contribution helps.
          • 13577
          • 302 Posts
          Hadn’t thought of it. Breadcrumbs was written before you could do that. Before there was even a MODx for that matter. I’m not sure how useful it would be as Breadcrumbs produces very little in the way of markup anyway. Pretty much the crumb separator is the only thing and it is configurable. But I suppose it could be rewritten to accomodate templating if there was a real clamor for such a feature. smiley
            Standard Disclaimer
            I could be totally wrong.
            • 14050
            • 788 Posts
            I have seen some done using unordered lists and some with definition lists when looking at templates. Just thought it would be nice to be able to keep the coding consistent with templates that are ported over by being able to pass template chunks to the breadcrumbs snippet.
              Jesse R.
              Consider trying something new and extraordinary.
              Illinois Wine

              Have you considered donating to MODx lately?
              Donate now. Every contribution helps.
              • 14269
              • 6 Posts
              Quote from: jaredc at Nov 29, 2006, 01:51 PM

              When I wrote this (many MANY moons ago), multiple languages were about the farthest thing from my mind! But it seems like what you really want to do is suppress the Home link all together. This is easily accomplished with the parameter:
              [[Breadcrumbs? &showHomeCrumb=`0`]]

              That will produce:

              Language 2 > item b

              I know that’s not exactly what you were looking for... but I think that’s as close as you’ll get with the snippet as it is now.

              I don’t know exactly how your users are selecting their preferred language. But it could work to rename your "language N" pages as "Home." Then with the showHomeCrumb option off, you’ll get a "Home" link - just not the site root Home.


              Yes, it may be a good solution.
              Thanks for your answer, Jaredc.
              :-)
                • 25059
                • 47 Posts
                Hi

                I think there’s a mistake in 0.9d. On line 122 :
                            $ptarr[] = '<span class="B_currentCrumb">'.$docInfo['pagetitle'].'</span>';

                It should be
                            $ptarr[] = '<span class="B_currentCrumb">'.$titleToShow.'</span>';
                  :: RiderCrazy.Com :: Server@Home - [WIP] En cours de transition vers MODx
                  • 19638
                  • 39 Posts
                  With MODx 0.9.5 & Breadcums 0.91 (& frieldly URLs) i have the following error when used :
                  1) just added [[Breadcrumbs?]] into the template
                  2) Work perfectly for home page (not showed)
                  3) Work perfectly for first sub-level pages like Home > Blog (Only Home is linked back and it’s working)
                  4) Do not work for sub-sub-page like Home > Blog > Some_post :
                  -> All links have an unneccessary sub-folder added. For exemple link to Home is http://www.mysite.com/blog/index.html & link to Blog become http://www.mysite.com/blog/blog.html (th /blog folder is not relevant)

                  I reply to myself :
                  In the template
                  <base href="[(site_url)]" />
                  is necessary in order for the friendly URLs to works
                    • 34162
                    • 1 Posts
                    I wanted to have a choice to show the crums as links or not, which was needed for my site.

                    I made a modification to the breadcrumb snippet and added the parameter &showCrumbsAsLinks. Possible values are 1 = show as links (default), 0 = show as text only.

                    If anyone has use for it, I post it here.
                      • 1978
                      • 131 Posts
                      Quote from: miniwark at Dec 13, 2006, 06:57 PM

                      With MODx 0.9.5 & Breadcums 0.91 (& frieldly URLs) i have the following error when used :
                      ...
                      I reply to myself :
                      In the template
                      <base href="[(site_url)]" />
                      is necessary in order for the friendly URLs to works

                      Thanks a lot. I just started digging the snippet code but looked here first.

                      2Author
                      What about making snippet relevant to global SEO-URL settings?
                        Как русифировать Modx 0.9.6.1(QuickEdit, TinyMCE)
                        QuickEdit под win-1251 без mb_-функций