We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14653
    • 24 Posts
    Quote from: PMS at Aug 03, 2009, 04:30 PM

    One additional observation.

    I noticed that you were using a FormatDate snippet call within your ditto template to format the date of your editedon placeholder. However, you could just add &dateSource=`editedon` to your ditto call and the fact that you have already specified &dateFormat=`%d.%m.%Y` would mean that it would just work.

    thanks for the hint, works
      Sys. info:
      MODx version: MODx Revolution 2.x
      OS: Archlinux roller
      • 14653
      • 24 Posts
      Finally, would you mind if I publicise your site and the fact that it uses YAMS by adding it to the table on the first post of this thread?

      Do not mind.
        Sys. info:
        MODx version: MODx Revolution 2.x
        OS: Archlinux roller
        • 22851
        • 805 Posts
        Here is some advice for those of you who are starting to use YAMS and who also wish to use PHx. Using both together should work in theory, and it does appear that this is possible, but I can’t guarantee that there wont occasionally be conflict between the two plugins.

        1. Go to Resources/Elements>Plugins>Edit Plugin Execution Order by Event and for each event in which YAMS appears, reorder the list to put YAMS in first place. Failure to do so can result in weird caching problems. For example, a page might look normal the first time your view it but might look different or might be blank the second time.

        2. You can mitigate potential conflict by trying to avoid mixing YAMS and PHx, and specifically by avoiding using PHx to achieve tasks that YAMS has been designed for. Here are some examples:

        2.a Instead of
        [+phx:if=`(yams_id)`:is=`en`:then=`Content`:else=`Содержание`+]
        

        use
        [[YAMS? &get=`text` &from=`en::Content||ru::Содержание]]
        


        2.b
        Instead of
        [+phx:if=`(yams_id)`:is=`en`:then=`[[AjaxSearch? &AS_landing=`60` &moreResultsPage=`8` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0`]]`:else=`[[AjaxSearch? &AS_landing=`60` &moreResultsPage=`8` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0` &language=`russian-utf8`]]`+]
        

        make a chunk ajaxsearch_en containing
        [[AjaxSearch? &AS_landing=`60` &moreResultsPage=`8` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0` &language=`english`]]
        

        and a chunk ajaxsearch_ru containing
        [[AjaxSearch? &AS_landing=`60` &moreResultsPage=`8` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0` &language=`russian-UTF8`]]
        

        Then, in your document template or content include
        [[YAMS? &get=`chunk` &from=`ajaxsearch`]]
        


        3. Don’t assume that using both will just work together. Test carefully.
          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
          jonimant. Your forums message box is full, so I can’t message you directly.

          Quote from: jonimant at Aug 04, 2009, 04:49 PM

          All done as you told me, but does not launch chunk
          [+phx:if=`(yams_id)`:is=`en`:then=`[[YAMS? &get=`chunk` &from=`ajaxsearch_en`]]`:else=`[[YAMS? &get=`chunk` &from=`ajaxsearch_ru`]]`+]

          This was a misunderstanding. You ONLY need
          [[YAMS? &get=`chunk` &from=`ajaxsearch`]]

          The syntax above will automatically choose from ajaxsearch_en, ajaxsearch_ru etc.

          With your settings (EDIT) YAMS 1.0.4 alpha RC3, it is equivalent to:
          [[YAMS? &get=`chunk` &from=`en::ajaxsearch_en||ru::ajaxsearch_ru||ua::ajaxsearch_ua`]]
            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.
            • 19209
            • 18 Posts
            I’m trying out MODx + YAMS because I have to overhaul an existing site that has a #1 requirement of being multilingual. I’ve managed to get MODx + YAMS up and running and read through the docs in the YAMS module (then read them again, and again, and again). They start off being very detailed but towards they become more and more generic.

            For example:

            11. Translate
            You can now view multiple language versions of your documents by browsing to the appropriate URL. However, initially all but the default language version has content written for it. Now is the time to go to each document and translate the content. Note that your site will continue to look normal and there wont be any links pointing to your new language versions until you jump to the next step.

            Exactly how does one "go to each document and translate the content"???

            From my initial reaction I’m leaning towards MODx + YAMS but I not quite convinced yet. Still need to play around with it to see what it can actually do for me.

            Thanks in advance,
            --mgbowman
              • 22851
              • 805 Posts
              Okay. So at stage 10 of the setup, you specified some templates as ’multilingual’.

              You can now go to any of the documents associated with the multilingual templates and edit them like normal. Assuming that you have set-up ManagerManager and the YAMS ManagerManager rules correctly, you will see one tab per language. Content from your normal MODx document variable fields *should* have automatically been copied over to your specified ’default language’ tab.

              However, the tabs for your other languages will be blank. You need to translate the default language content and fill them in.

              Let me know how you get on. Hopefully I can convince you that YAMS is the way to 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.
                • 19209
                • 18 Posts
                Woo-hoo! After staring from scratch again I managed to figure it out. There’s a few things it appears I’m unable to achieve and it really helps better SEO with multi-lingual sites.


                • Resource’s Alias (which in effect gives you translated URLs)
                • META Tags / Keywords (these could just be additional TVs no?)

                Another thing I noted, while editing a resource you are presented with "Summary (en)" and "Summary (fr)" but if you use [*summary*] in the template nothing happens. I think it’s because there’s no summary_en / summary_fr TVs as there are for every other translatable field.

                Thanks in advance,
                --mgbowman
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  "Summary" is actually "introtext". It’s a legacy holdover from the original terminology, and it’s "introtext" still in the database, while "Summary" was thought to be a better label for the field. Similar to "chunks" being "htmlsnippets" originally, and that’s still the name of the table in the database, and the field for the chunk’s content is "snippet".
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 4971
                    • 964 Posts
                    Does YAMS works with EVO 1.0? or only with 0.9.6.x?

                      Website: www.mercologia.com
                      MODX Revo Tutorials:  www.modxperience.com

                      MODX Professional Partner
                      • 22851
                      • 805 Posts
                      Quote from: mgbowman at Aug 05, 2009, 10:54 AM

                      Woo-hoo! After staring from scratch again I managed to figure it out. There’s a few things it appears I’m unable to achieve and it really helps better SEO with multi-lingual sites.


                      • Resource’s Alias (which in effect gives you translated URLs)
                      • META Tags / Keywords (these could just be additional TVs no?)

                      Multilingual URLs
                      That is on the TO DO list (see the first post of this thread) ... but it’s not a simple issue and I’m so overwhelmed with YAMS support at the moment that I don’t have much time left for development, so it’s going to be a while until I get around to this.

                      META Tags / Keywords
                      This is possible to achieve right now. I’ll add the following explanation to the How To? part of the documentation. Currently you have to wire it up manually as follows:

                      1. Create one keywords template variable for each language: keywords_en, keywords_fr, ...
                      2. In your document template, include
                      <meta name="keywords" content="[[YAMS? &get=`tv` &from=`keywords`]]" ></meta>
                      


                      A minor problem is that the different language variants wont be correctly tabified when you edit a document at the moment. It’s quite easy to fix and it’s already on the TO DO list - just haven’t got around to it because no-one has shouted loud enough.

                      Yet another thing that is already on the TO DO list is to make it possible to specify ’multilingual template variables’ via the module interface. Then, you would just be able to specify that you want a multilingual TV called ’keywords’, YAMS would create the various language variants automatically (keywords_en, etc.), they would appear correctly tabified when you edit a document, you would be able to refer to the tv within your document in the normal way [*keywords*], and the correct language variant would automatically be chosen, just like you can do with the text based document variables.

                      Quote from: mgbowman at Aug 05, 2009, 10:54 AM

                      Another thing I noted, while editing a resource you are presented with "Summary (en)" and "Summary (fr)" but if you use [*summary*] in the template nothing happens. I think it’s because there’s no summary_en / summary_fr TVs as there are for every other translatable field.

                      Sottwell dealt with that one for me. Thanks!
                        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.