We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51824
    • 27 Posts
    Hi,

    I'm just beginning to use Babel for making our site multilingual (at least german and english) and now I've an issue with Wayfinder: It simply doesn't display dropdown menus in the english part where they are neccessary, while the same Wayfinder-call in the german part works as expected:

    Wayfinder-call german:
              [[Wayfinder? &startId=`0`&outerTpl=`menuContainer` &outerClass=`nav navbar-nav navbar-right` &rowTpl=`menuRow` &innerTpl=`innerContainer` &innerClass=`dropdown-menu` &parentRowTpl=`menuParents` &parentClass=`dropdown` &hereClass=`active`]]
                


    Result (part of, containing a drop-down-menu)
    <li class="dropdown"><a href="chor/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspoup="true" aria-expand="false">Chor <span class="caret"></span></a>
    <ul  class="dropdown-menu" ><li   class="first dropdown"><a href="der-chor/" title="Der Chor">Der Chor</a></li>
    <li  ><a href="dirigent.html" title="Dirigent">Dirigent</a></li>
    <li   class="dropdown"><a href="archiv/" title="Archiv">Archiv</a></li>
    <li   class="last"><a href="konzerte.html" title="Mitglied werden">Mitglied werden</a></li>
    </ul></li>


    Wayfinder-call english:
    [[Wayfinder? &startId=`44` &outerTpl=`menuContainer` &outerClass=`nav navbar-nav navbar-right` &rowTpl=`menuRow` &innerTpl=`innerContainer` &innerClass=`dropdown-menu` &parentRowTpl=`menuParents`  &parentClass=`dropdown` &hereClass=`active`]]


    Result (part of, should be drop-down but isn't):
    <li class="dropdown"><a href="chor/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspoup="true" aria-expand="false">Choir <span class="caret"></span></a>
    <ul  class="dropdown-menu" ><li   class="first"><a href="archive.html" title="Archive">Archive</a></li>
    <li   class="last"><a href="the-choir.html" title="The Choir">The Choir</a></li>
    </ul></li>



    As one can see, there's missing the class "dropdown" which is wired, 'cause I'm using the same call, the same chunks...


    I'm using bootstrap 3 as framework.

    The chunks are these:

    innerContainer:
    <ul [[+wf.classes]] >[[+wf.wrapper]]</ul>


    menuContainer:
    <ul [[+wf.classes]]>[[+wf.wrapper]]
    [[!Personalize?
        &yesChunk=`yes`
        &noChunk=`no`
    ]]
    </ul>


    menuParents:
    <li[[+wf.classes]]><a href="[[+wf.link]]" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspoup="true" aria-expand="false">[[+wf.linktext]] <span class="caret"></span></a>
    [[+wf.wrapper]]</li>


    menuRow:
    <li [[+wf.id]] [[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]"[[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</li>



    URL: www.chorphilharmonie.de
    and
    www.chorphilharmonie.de/en/home/

    Any suggestions?
      • 44195
      • 293 Posts
      Does it still happen if you call Wayfinder uncached? e.g. [[!Wayfinder? other_options_here]]
        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
        • 44064
        • 185 Posts
        Please also double check pages settings for both languages, they must be identical (f.e. "container" checkbox("isfolder" parameter), context settings for en and de), same Wayfinder call for both languages must work with identical settings & pages structure as for me.

        Also if Babel was laready installed please check system babel settings, does Babel uses for both contexts.

        Hope something like that can help, there are no any other suggestions.

        Regards,
        your Captain smiley
          Anton Tarasov
          MODX Developer

          Email: [email protected]
          Web: antontarasov.com
          • 51824
          • 27 Posts
          Quote from: muzzstick at Nov 23, 2016, 02:14 AM
          Does it still happen if you call Wayfinder uncached? e.g. [[!Wayfinder? other_options_here]]

          Yes - it still happens then
            • 44195
            • 293 Posts
            Sorry for the late reply. If you're still having this issue it could be that you need a context parameter in your wayfinder call.
              I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
              Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
            • Hi there,

              do we habe a solution here? I am running into the same issue. Wayfinder does work well in the native language, but the main menu (by wayfinder) does not carry the /en/ or /fr/ url prefix before the longtail.

              startID of german language is 0 (zero), so I would not set another startID for the other contexts. Any ideas?
                • 32507
                • 142 Posts
                Do you have these Context settings for other languages?
                Base URL
                Site Start
                Site URL
                  • 32507
                  • 142 Posts
                  @calvair
                  Checking your sitemenu, it seems to identical both en and de. Although dropdown menu is not working on English site. Are you sure it's not javascript related (bootstrap.js)
                  • All kind of content is fine. Babel links do show the non active language links, all asset links lead to the same (international) assets folder, all babel links lead correctly to the translated version of the resource. Only wayfinder is not behaving like expected.
                    • I found the solution for me. I had to extend the base URL in my header template:

                      <head>
                          <base href="https://whew100.de[[++base_url]]" />
                          <title>[[*pagetitle]] - [[++site_name]]</title>


                      I added [[++base_url]] which is what I set in the context settings before.