We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    It seems like most people would find it really useful to have the full power of Ditto available when using YAMS, rather than just being able to use the placeholders for the standard document fields.

    I was thinking about how to achieve this and have come up with an idea:

    Write a wrapper class for Ditto, or if necessary, modify/customise it so that it will also accept a &yams_lang_id=`...` parameter. Then somewhere within Ditto where it grabs the content it requires for the standard document fields from the database, it should instead be wired up to grab the content from template variables called {standard field name}_{yams_lang_id} if that document is multilingual. (YAMS will need to be asked whether or not the document or its document template is multilingual.) By doing this it should be possible for Ditto to function as normal. It will be using multilingual content but it wont even know it, so all the additional Ditto placeholders and extenders should work seamlessly. The standard document fields this applies to are: pagetitle, longtitle, description, menutitle, content, and possibly alias.

    I’ve got no idea when I’ll find the time to investigate that this further. I’m really busy for the moment. The above task would require fairly minimal knowledge of YAMS and the YAMS api etc. So, I’m making this idea public so that if anyone needs this and feels like a challenge, they can 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.
      • 10176
      • 6 Posts
      Hi. Im using YAMS and it works great for placeholders for the standard document fields. The thing is that I have som custom TV’s that I need to be multilingual when using with Ditto.

      Im using YAMS with Ditto to pull the information from, for example content, like so: [+content+]

      How can I also pull info from my custom multilang TV’s called infobox_en, infobox_sv and so forth.

      I try to use this in my ditto template but no luck:

      [[YAMS? &get=`tv` &from=`infobox`]]

      One really strange thing is that when I, within Ditto, use: [+infobox_(yams_id)+] it doesnt work, [+infobox_en+] however works fine.
        • 22851
        • 805 Posts
        Please try [tt][[YAMS? &get=`data` &from=`infobox` &docid=`[+id+]`]][/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.