We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    what is your mmlCache - snippet - call?
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 44870
      • 35 Posts
      I chcecked my mmlCache call. I forgot about &includeContent=`1`
      Thank You!
        • 36549
        • 572 Posts
        Hi,

        I have pretty much got migxMultiLang sorted and it's all working as expected but I can't work out how to get some TV's processed.
        I have a list that will need to change and expand so i have this set up working with MIGX but i need to set it up to work with multiLang.
        Here's what i have so far:
        I have 2 chunks for each of my languages i.e. myChnunkTpl_cultureKey :
        <li><a href="#" title="#">[[!+mml_themeTitle]]</a></li>
        I have a formTabs configuration like this (mml_themeTitle has been created as a TV):
        [
          {
            "MIGX_id":1,
            "caption":"Theme Title",
            "print_before_tabs":"0",
            "fields":[
              {
                "MIGX_id":1,
                "field":"mml_themeTitle",
                "caption":"Theme Title",
                "description":"",
                "description_is_code":"0",
                "inputTV":"",
                "inputTVtype":"",
                "validation":"",
                "configs":"",
                "sourceFrom":"config",
                "sources":"[]",
                "inputOptionValues":"",
                "default":""
              }
            ]
          }
        ]


        My getImageList call like this:
        [[!getImageList?
        &tvname=`mml_themes`
        &tpl=`myChunkTpl_[[!++cultureKey]]`
        &docid=`14`
        ]]

        My TV [[mml_themes]] has my formTabs content which is the same as i would have when using migx. So this works in that i have migx working on resource #14 but not in the translations area. All i have in there is the [[mml_themeTitle]] which doesn't output anything and the input is just one text field.
        What do i need to do in order to get my migx appearing in the translations area?

        Thanks for any help
          www.9thwave.co.uk
             WEB | DESIGN | PRINT
          • 4172
          • 5,888 Posts
          I would translate MIGX-items all in one place.
          For example:

          [
            {
              "caption":"English",
              "fields":[
                {
                  "field":"themeTitle_en",
                  "caption":"Theme Title",
                }
              ]
            },
            {
              "caption":"Deutsch",
              "fields":[
                {
                  "field":"themeTitle_de",
                  "caption":"Theme Title",
                }
              ]
            }
          ]


          and use one chunk for both languages:

          <li><a href="#" title="#">[[!+themeTitle_[[!++cultureKey]]]]</a></li>
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 36549
            • 572 Posts
            Thanks for getting back to me Bruno.
            OK so I now have the 2 form tabs for each language set in my migx TV [[mml_themes]] (you do mean in the standard migx TV rather than the Translations area right?) and this is displaying in the resource as it should.
            I also have the 2 TV's set in the translations area i.e. themeTitle_en and themeTitle_we
            My getImageList call is:
            [[!getImageList? 
            &tvname=`mml_themes`
            &tpl=`@CODE:<li><a href="#" title="#">[[!+themeTitle_[[!++cultureKey]]]]</a></li>`
            &id=`14`
            ]]

            ...but nothing is displaying on then front end.

            The mml_themes TV is (i have included "inputTV":"themeTitle_en" but still nothing on the front end):
            [
              {"caption":"English","fields":[
                  {"field":"themeTitle_en","caption":"Theme Title English"}
                ]
              },
              {"caption":"Welsh","fields":[
                  {"field":"themeTitle_we","caption":"Theme Title Welsh"}
                ]
              }
            ]

            [
            {"header": "Title English", "width": "160", "sortable": "true", "dataIndex": "themeTitle_en"},
            {"header": "Title Welsh", "width": "160", "sortable": "true", "dataIndex": "themeTitle_we"}
            ]

            I can't figure out what i'm missing?
              www.9thwave.co.uk
                 WEB | DESIGN | PRINT
              • 4172
              • 5,888 Posts
              I also have the 2 TV's set in the translations area i.e. themeTitle_en and themeTitle_we

              you don't need this 2 TVs, try to remove both of them.

              and use a chunk for the tpl:

              &tpl=`aChunkName`


              <li><a href="#" title="#">[[!+themeTitle_[[!++cultureKey]]]]</a></li>

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

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 36549
                • 572 Posts
                Thanks Bruno - I didn't realise it would be that simple.
                  www.9thwave.co.uk
                     WEB | DESIGN | PRINT
                • And that is why I got Bruno to do this!

                  I did one multi-language site using contexts and Babel, and it was not fun. Yes, this isn't perfect, and may not suit all sites. But for anything I'll ever do it sure beats fussing around with contexts.
                    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
                    • 26903
                    • 1,336 Posts
                    I'm having problems with tags being stripped out of templates I'm supplying to the mml_cache call, even if use the [![! notation it still strips the tags out. Specifically I want embed a snippet in my template chunk :-

                    [![!articlesCreateTagList]]

                    which returns a string, however it gets stripped. Also the following gets stripped :-

                    <p>[[+comments_enabled:is=`1`:then=` | <a href="[[~[[*id]]]]#comments" class="comments">Comments ([[+comments_count]])</a>`]]</p>

                    How do I encode this using the [![! stuff top stop this.
                      Use MODx, or the cat gets it!
                      • 4172
                      • 5,888 Posts
                      does it also get stripped with

                      &cache=`0`


                      can I see that issue in action?
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!