We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50429
    • 14 Posts
    Quote from: lucy at Mar 05, 2015, 10:25 AM
    Quote from: Bruno17 at Mar 04, 2015, 02:10 AM


    You can add additional TVs with the Formmanager in the migxMultiLang - CMP
    You can duplicate the default (example)- configuration and add tabs and fields for TVs to the form, just like you would do with any other MIGX-configuration.

    Ah, well this is my first time using MIGX (and MML and pdoTools too!) A steep learning curve but so worth it.

    So to clarify:

    • 1. I duplicate the example configuration using the Duplicate button in the MML Form Manager
    • 2. On the new configuration I click the Edit raw button and see something like this:
    [
      {
        "MIGX_id":1,
        "caption":"Document",
        "print_before_tabs":"0",
        "fields":[
          {
            "MIGX_id":1,
            "field":"mml_pagetitle",
            "caption":"Pagetitle",
            "description":"",
            "description_is_code":"0",
            "inputTV":"",
            "inputTVtype":"",
            "configs":"",
            "sourceFrom":"config",
            "sources":"[]",
            "inputOptionValues":"",
            "default":""
          },
          {
            "MIGX_id":2,
            "field":"mml_longtitle",
            "caption":"Longtitle",
            "description":"",
            "description_is_code":"0",
            "inputTV":"",
            "inputTVtype":"",
            "configs":"",
            "sourceFrom":"config",
            "sources":"[]",
            "inputOptionValues":"",
            "default":""
          },
          {
            "MIGX_id":6,
            "field":"mml_menutitle",
            "caption":"Menutitle",
            "description":"",
            "description_is_code":"0",
            "inputTV":"",
            "inputTVtype":"",
            "validation":"",
            "configs":"",
            "sourceFrom":"config",
            "sources":"[]",
            "inputOptionValues":"",
            "default":""
          },
          {
            "MIGX_id":5,
            "field":"mml_introtext",
            "caption":"Summary (introtext)",
            "description":"",
            "description_is_code":"0",
            "inputTV":"",
            "inputTVtype":"textarea",
            "configs":"",
            "sourceFrom":"config",
            "sources":"[]",
            "inputOptionValues":"",
            "default":""
          },
          {
            "MIGX_id":3,
            "field":"mml_content",
            "caption":"Content",
            "description":"",
            "description_is_code":"0",
            "inputTV":"",
            "inputTVtype":"richtext",
            "configs":"",
            "sourceFrom":"config",
            "sources":"[]",
            "inputOptionValues":"",
            "default":""
          }
        ]
      }
    ]

    • 3. To the end of that json file I add something like:
          {
            "MIGX_id":7,
            "field":"mml_secondaryContent",
            "caption":"Secondary Content",
            "description":"",
            "description_is_code":"0",
            "inputTV":"",
            "inputTVtype":"richtext",
            "configs":"",
            "sourceFrom":"config",
            "sources":"[]",
            "inputOptionValues":"",
            "default":""
          }


    Questions:
    What happens to the original (example) configuration when I create the duplicate? Is it still used somehow and/or does it create a conflict with the new one?
    Why not just edit the original configuration?
    I have an existing TV I want to translate - do I add the name of that TV in "field" as it is, or does the "field" name need to begin with mml_?
    Do I just choose a number for MIGXid field (I assume it needs to be unique)?

    Hey Lucy,

    Did you ever figure out how to translate an existing TV?

    Thanks!
      • 37047 ☆ A M B ☆
      • 309 Posts
      I haven't yet - this project was back-burnered for a bit. But about to start up again next week so I will post here my steps if I get it figured out. I think most, if not all, of the answer is above - just haven't actually done it yet. Bruno is incredibly helpful, so if you start down the path you can then post more specific questions here and he'll jump in I'm sure.
        Lucy Iannotti
        Following Sea design & development
        http://www.following-sea.com
        New Bedford, MA
        • 4172
        • 5,888 Posts
        if you haven't allready created a copy of your formtabs-configuration then duplicate the default configuration

        Add the field with the tvname to the tab or create a new tab and add it there.
        Select the template(s), where you want to use that configuration or set is as the default one.
        Save it and you should be done.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 8548
          • 104 Posts
          Hi Bruno,

          really great work on that addon!

          I've installed it easaly, played with it and I found 2 things I can't figure out how to make it work.

          If I put nothing in the default culturkey (wich I think is more logic for client UX), it displays nothing on the front end (with the default resource field filled (pagetitle, longtitle, etc).
          Then second thing, is if I make change in the page for a specific language, click DONE, I have to reload the page before being able to do changes in the laguage TV again.

            • 4172
            • 5,888 Posts
            In the formmanager, you can check
            Hide default language from Translations - grid

            and change the placeholders

            [[+mml_pagetitle]] 


            and so on to

            [[+pagetitle]] 

              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 8548
              • 104 Posts
              Quote from: Bruno17 at Jun 24, 2015, 07:05 AM
              In the formmanager, you can check
              Hide default language from Translations - grid

              and change the placeholders

              [[+mml_pagetitle]] 


              and so on to

              [[+pagetitle]] 


              that's all ready done, but if I change the placeholders in my chuck.tpl, I get the content of the pagetitle of the default resource input and not from the translated one anymore.

              Did I mistunderstood where I needed to change the place holder from
              [[+mml_pagetitle]] 
              to
              [[+pagetitle]] 
              ?
                • 37047 ☆ A M B ☆
                • 309 Posts
                Are your chunks called uncached? They need to be if they have translations.
                  Lucy Iannotti
                  Following Sea design & development
                  http://www.following-sea.com
                  New Bedford, MA
                  • 8548
                  • 104 Posts
                  Hi Lucy,

                  yes it is, here's my call :
                  [[!mmlCache?
                    &element=`pdoResources`
                    &parents=`0` 
                    &resources=`[[*id]]` 
                    &tpl=`Accueil.casino.tpl` 
                    &includeTVs=`[[mmlGetTemplateTVs]]` 
                    &prepareTVs=`1` 
                    &processTVs=`1`
                    &includeContent=`1`
                    &tvPrefix=``
                    &loadModels=`migxmultilang`
                    &prepareSnippet = `mmlTranslatePdoToolsRow`
                  ]]
                    • 37047 ☆ A M B ☆
                    • 309 Posts
                    It's the chunks you need to look at (that's the snippet.) In that tpl chunk named Accueil.casino.tpl do you have any child chunks with translations? They are the ones that need to be called uncached. For instance I have a [[!$header]] and a
                    [[!$navBar]] in my template that normally I would call cached, but since they have translated TVs inside they need to be uncached.
                      Lucy Iannotti
                      Following Sea design & development
                      http://www.following-sea.com
                      New Bedford, MA
                      • 50429
                      • 14 Posts
                      Quote from: Bruno17 at Jun 14, 2015, 02:10 AM
                      if you haven't allready created a copy of your formtabs-configuration then duplicate the default configuration

                      Add the field with the tvname to the tab or create a new tab and add it there.
                      Select the template(s), where you want to use that configuration or set is as the default one.
                      Save it and you should be done.

                      Thanks! I was able to get it working. Just had to use the culture key to specify which TV would be used.

                      Is there a way to translate the url of the same page?