We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    Okay. I’ll give it a go.
      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.
      • 22851
      • 805 Posts
      The problem was that you had specified [tt][[YAMS? &get=`tv` &from=`newsletter`]][/tt] within the [tt]newsletter_langid[/tt] template variable. The role of [tt][[YAMS? &get=`tv` &from=`newsletter`]][/tt] is to get the multilingual template variable... so this was resulting in an infinite loop. I moved the [tt][[YAMS? &get=`tv` &from=`newsletter`]][/tt] call to your document template and now it all works fine.

      Also created a hidden document that pulls in some content from another document using [tt]((yams_data:docid:content_langid))[/tt].
        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.
        • 14404
        • 84 Posts
        Thank you so much for everything! shocked

        It works great now! I have one more little question about the hidden document u created for me.

        So, the code ((yams_data:docid:content_langid)) works fine, but is there an option to generate the langid from the page where ur currently on? i’m using this for ditto newslisting, but it should work in every language.. any idea?
          • 22851
          • 805 Posts
          The special yams placeholder [tt](yams_id)[/tt] gets the language id of the current language. I think nesting of the placeholders should work, so you could do: [tt]((yams_data:docid:content_(yams_id)))[/tt]. A better way is probably to do this instead however: [tt][[YAMS? &get=`data` &from=`content` &docid=`docid`]][/tt]

          Please note however that you your case you have used [*content_en*] in your non-English template variables (French for example) in order to copy over the English content to the other languages until they are translated. The problem with this is that when you use [tt]((yams_data:docid:content_fr))[/tt] it will get replaced by [*content_en*] - which will output the English content of the current document - not of the document given by docid as you might expect.
            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.