We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17883
    • 1,039 Posts
    One quick question: How can I handle documents which have no translation (regional related content)? The main menu is no problem, I can disable the item via phx, but it would be nice if the language selection would also disable the link to the translation if there is no content in the content field. Perfect solution would if YAMS disables all related output itself (perhaps via own "publish language" TV for example).
      • 22851
      • 805 Posts
      Quote from: MadeMyDay at Sep 17, 2009, 05:44 AM

      One quick question: How can I handle documents which have no translation (regional related content)? The main menu is no problem, I can disable the item via phx, but it would be nice if the language selection would also disable the link to the translation if there is no content in the content field. Perfect solution would if YAMS disables all related output itself (perhaps via own "publish language" TV for example).
      I think you are saying that you would like a multilingual document which has all language variants apart from one disabled - so that it is in fact available in only one of the available languages. There isn’t an easy way to do this in YAMS at the moment.

      There is an item already on the TO DO list which proposes implementing exactly what you are asking using a template variable control as you suggest - but before I go ahead with something like that I’d need to assess the potential overhead the checking or storage of info required for the checking would necessarily involve. I can’t see myself getting around to this in the very near future however. Probably not before the end of October.

      In the meantime the approach that you have suggested is probably best:

      Hide links to the disabled language variants, perhaps using PHx as you have suggested. For the document itself you could create a new template, identical to the default one in all respects apart from having a modified language-select YAMS template that greys out the disabled languages. If you are using an xml sitemap you will also need to be careful to make sure the disabled language variants don’t appear.

        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.
        • 17883
        • 1,039 Posts
        Hi Paul,

        great to hear that you are aware of this topic.

        Hide links to the disabled language variants, perhaps using PHx as you have suggested.

        That is no problem in Wayfinder 2.5, but you know... it doesn`t work properly with YAMS yet. But I think there is a solution anyway, with or without phx.

        Problem is the language selector. It has to be modified so that if e.g. content_en is empty it will not render "english" as link or grey it out. I will look into your snippet if this could be possible with a workaround.

        For the document itself you could create a new template, identical to the default one in all respects apart from having a modified language-select YAMS template that greys out the disabled languages.

        This is too much handling, because if sometime the customer wants to add a translation, he has to be able to do it without changing things he cannot understand ;-)
          • 22851
          • 805 Posts
          Quote from: MadeMyDay at Sep 17, 2009, 07:44 AM

          Problem is the language selector. It has to be modified so that if e.g. content_en is empty it will not render "english" as link or grey it out. I will look into your snippet if this could be possible with a workaround.
          The only way I can think of doing that at the moment is to try putting some PHx logic in the YAMS language list repeattpl and currenttpl templates.
            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.
            • 36624
            • 535 Posts
            Hi PMS,

            first of all thanx for this great module, i’m using it to build a little site and it’s great. As usual with great functionalities it’s a bit hard to begin but it’s going better.. smiley

            i have a problem with the [ FirstChildRedirect ] snippet included in EVO.1.0.

            in my folder document i just put the snippet call in content (i have tried to put in english/french tab content too) and in front end when i click on the parent folder It always send me to the french (default language) content even if i’m browsing the english site.

            the link showed in the menu in the adress bar is ok (http://domain.com/expositions.html?lang=en) but when the redirect happen it switch to http://domain.com/mychild.html?lang=fr).

            i have try to use cached, un cached snipped / page but i’m out of idea now...

            i’m using 1.1.5a and my "Query param mode is currently ON"

            and sorry for my bad english.
              CTRL+SHIFT+U - Clear Cache
              CTRL+SHIFT+H - Hiding Heft Panel
              CTRL+SHIFT+N - Fast Create Resource
              CTRL+ALT+P - Preview Recource (in edit resorce window)
              CTRL+ALT+S - Save
              • 22851
              • 805 Posts
              Quote from: manu at Sep 18, 2009, 10:20 AM

              i have a problem with the [ FirstChildRedirect ] snippet included in EVO.1.0.

              Hi @Manu

              Unfortunately, the FirstChildRedirect snippet doesn’t work with YAMS. One solution is to make the parent document a weblink that points to the first child. You can make the the template associated with the weblink multilingual, just like with a document. With multilingual weblinks you have to specify the id of the document you want to redirect to (or the URL of the resource you want to redirect to) in the content field for each language. (That way you could redirect each language variant to a different document/location if you wanted.)

              Let me know if that solution works for you. There is no need to apologise for your English by the way. C’est probablement beaucoup mieux que mon français !

                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.
                • 36624
                • 535 Posts
                Quote from: PMS at Sep 18, 2009, 10:40 AM

                One solution is to make the parent document a weblink that points to the first child.

                OMG ! It Works grin hihihi.. so simple so beautiful. Thanx !!!

                I have to say that it’s 1 month now i’m following this thread while developing my multilangue site, and your involvement for the community is incredible !

                \o/ Bravo !

                  CTRL+SHIFT+U - Clear Cache
                  CTRL+SHIFT+H - Hiding Heft Panel
                  CTRL+SHIFT+N - Fast Create Resource
                  CTRL+ALT+P - Preview Recource (in edit resorce window)
                  CTRL+ALT+S - Save
                  • 8951
                  • 10 Posts
                  Hi there,

                  I’m trying to install the latest version of YAMS on modx 9.6, but the following error is preventing me from installing:

                  Parse error: syntax error, unexpected ’&’, expecting T_VARIABLE or ’$’ in /mnt/sites/site597/web/assets/modules/yams/yams.module.inc.php on line 2401

                  I’ve followed the instructions exactly, but i can’t figure out what’s wrong.

                  Can somebody please help me?

                  Best regards,

                  Michiel
                    • 22851
                    • 805 Posts
                    Strange. What version of PHP is installed? (Answer can be found here: Reports > System Info > phpInfo() > view)
                      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.
                      • 8951
                      • 10 Posts
                      Quote from: PMS at Sep 22, 2009, 10:13 AM

                      Strange. What version of PHP is installed? (Answer can be found here: Reports > System Info > phpInfo() > view)

                      Oh, well there we go then. It appears my server is running PHP 4.4, which I believe not to be compatible with YAMS. Stupid me for not checking that wink

                      Thanks!