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

    I’m currently working on a testimonials page, and have this call on my English and my Dutch page:

    [!Ditto? &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &id=`(yams_id)` &language=`(yams_mname)` &parents=`27` &display=`1` &paginate=`1` &paginateAlwaysShowLinks=`1` &orderBy=`createdon ASC` &tpl=`testimonials_page`!]

    Showing [+(yams_id)_start+] - [+(yams_id)_stop+] of [+(yams_id)_total+] News Items | Page [+(yams_id)_currentPage+] of [+(yams_id)_totalPages+]

    [+(yams_id)_previous+]

    [+(yams_id)_next+]

    When i select next page in English everything is working fine, but when i do the same on the dutch page, the language switches to English...

    The link "next" that is being pointed at on the dutch page is:

    http://whatever.com/testimonials.html?yams_lang=nl&start=1

    My question is, what am I doing wrong? Why does the language jump to English?

    I have friendly url’s turned on... running modx 1.0.2 and everything that came with it. Yams 1.0.5 beta.

    Thanks for any help.

    Thijs
    • I noticed the link that "next" is pointing at is the problem.

      right now its:
      http://whatever.com/testimonials.html?yams_lang=nl&nl_start=1

      and it should be:
      http://whatever.com/nl/testimonials.html?yams_lang=nl&nl_start=1

      How do i change the formatting of this link?


        • 9994
        • 133 Posts
        It looks like ur doing nothing wrong but. There is a newer version of YAMS available which maybe solves your problemo.

        http://nashi.podzone.org/assets/files/yams_1.1.7_alpha_rc7.zip
          Best CMS eva!
          • 22851
          • 805 Posts
          Yes. Looks fine. The new version of YAMS should solve it. Let us know if it doesn’t.
            YAMS: Yet Another Multilingual Solution for MODx
            YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
            Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
            • 19328
            • 433 Posts
            I’ve got the same problem.
            My YAMS site has got two languages: en and nl.

            The root URL for NL = www.mywebsite.nl
            The root URL for EN = www.mywebsite.nl/en/

            The Ditto call and placeholders:
            [!Ditto?extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &id=`(yams_id)` &language=`(yams_mname)` &tpl=`tpl_news_list` &summarize=`10` &paginate=`1` &paginateAlwaysShowLinks=`1` &orderBy=`pub_date DESC` !] 
            
            Nieuwsbericht [+(yams_id)_start+] - [+(yams_id)_stop+] van [+(yams_id)_total+] nieuwsberichten | Pagina [+(yams_id)_currentPage+] van [+(yams_id)_totalPages+]
            [+(yams_id)_previous+] [+(yams_id)_pages+] [+(yams_id)_next+]


            On the NL version the Ditto pagination link for next is: http://www.mywebsite.nl/nieuws?nl_start=10
            On the EN version it is: http://www.mywebsite.nl/nieuws?en_start=10
            This means the english ’next’ link brings me to the dutch newspage.

            Only the EN version should be different: http://www.mywebsite.nl/en/news?en_start=10
            (two changes: adding /en/ in the URL and changing ’nieuws’ (dutch) to ’news’ (english)).
            (actually, the whole ’nl_’ and ’en_’ prefix isn’t necessary because there are different root names).

            I’m using YAMS 1.1.7 RC7, root name mode
            Ditto 2.1.0
            Modx 1.0.2

            Any idea how I can fix this?
              • 22851
              • 805 Posts
              Yes. Ditto creates standard MODx URLs rather than multilingual ones. To get it to work you have to tell YAMS to accept standard MODx URLs for the documents that might appear in the Ditto results (or all documents if you wish) and to redirect to the correct multilingual URL (while keeping the current language).

              So, go to Modules>YAMS>Other Params>URL Redirection Settings>MODx URLs and add a comma separated list of document ids, or * for all documents.

              I’ve just noticed that this important step is missing from the YAMS + Ditto documentation page. I’ll add it later.
                YAMS: Yet Another Multilingual Solution for MODx
                YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                • 19328
                • 433 Posts
                Thanks for your quick reply! I’ve tried adding the document ID of the document that contains the Ditto call (the news page) as you’ve suggested. Unfortunately there are no changes, the ’next’ link on the English page still redirects to the Dutch page.

                I’ve put the Ditto call in both the Dutch and the English YAMS content-fields of the news page. Is that correct?.
                Is it also correct that I use: [+(yams_id)_next+] or should I use [+nl_next+]?

                Should I also include the document ID’s of all the news items that are displayed in the ditto results on the news page? If so, how does this work when my client adds a new news item? Do I have to put the document ID in the YAMS setting manually everytime? Or is it just the ID of the document that contains the call?

                Just trying to think of some reasons it might not be working for me..
                  • 22851
                  • 805 Posts
                  Hi michell84

                  It’s the ids of the documents that appear in the results that need to be specified. Since you wont know what those ids will be beforehand the best solution is to specify * (all documents).
                    YAMS: Yet Another Multilingual Solution for MODx
                    YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                    Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                    • 19328
                    • 433 Posts
                    Hi PMS,
                    Thanks for your help!
                    I’ve tried the star, but it still doesn’t work...
                    Same problem as described in my first post, the English ’next’ link jumps to the Dutch version of the site.
                    Maybe I can use mod rewrite to rewrite the url of the next link or something?
                      • 22851
                      • 805 Posts
                      Quote from: michelle84 at Jan 29, 2010, 02:58 PM

                      Hi PMS,
                      Thanks for your help!
                      I’ve tried the star, but it still doesn’t work...
                      Same problem as described in my first post, the English ’next’ link jumps to the Dutch version of the site.
                      Maybe I can use mod rewrite to rewrite the url of the next link or something?
                      Hi michelle84.

                      Your redirection mode (YAMS>Other Params>Redirection Mode) must be set to "Current" or "Current else Browser". The ditto pagination extender outputs standard MODx URLs. If your redirection mode is set to "Default" then YAMS will always redirect to the default language when you click on a pagination link. That’s probably the problem.

                      I know that this is a bit late, so I hope it’s still useful...
                        YAMS: Yet Another Multilingual Solution for MODx
                        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.