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
    inputTV | this is the name of TV, which you need to create. MIGX will use this TVs input-type and input-options, also pathes from image-tvs for the output and so on. You can use the same inputTV multiple times for different fields, for example when you need more than one image-TV-fields.
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 22897 ☆ A M B ☆
      • 209 Posts
      Got it. Fields != TVs, and I don't need to create a TV for every field (which I'd done thinking a field couldn't be saved without a TV to hold the value). I only need to create TVs for fields which aren't text inputs.
        MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
        • 36926
        • 701 Posts
        Is it possible to use normal placeholder tags within the migx template when it's being used in conjunction with getResource as I can't seem to get this to work.

        So for example the migx template would look like

        <a href="#" rel="[[+pagetitle]]><img src="[[+image]] alt="[[+altTxt]] /></a>
        


        So the pagetitle tag would be the page title of the particular resource thats being pulled in by getResouce.But currently nothing gets rendered out in place of [[+pagetitle]]

        [[*pagetitle]] works ok, but of course this displays the pagetitle of the resource your on as apposed to the resource thats being pulled in by getResouce.

        Thanks

        B
          • 4172
          • 5,888 Posts
          Quote from: bennyb at Dec 22, 2011, 06:48 AM
          Is it possible to use normal placeholder tags within the migx template when it's being used in conjunction with getResource as I can't seem to get this to work.

          So for example the migx template would look like

          <a href="#" rel="[[+pagetitle]]><img src="[[+image]] alt="[[+altTxt]] /></a>
          


          So the pagetitle tag would be the page title of the particular resource thats being pulled in by getResouce.But currently nothing gets rendered out in place of
           [[+pagetitle]]


          [[*pagetitle]]
          works ok, but of course this displays the pagetitle of the resource your on as apposed to the resource thats being pulled in by getResouce.

          Thanks

          B

          If you are using getImageList inside a getResource tpl you can push the getResources-placeholders to getImageList's properties.

          example:

          [[getImageList? 
          &docid=`[[+id]]` 
          &tpl=`mytpl` 
          &tvname=`migxtv`
          &title=`[[+pagetitle]]`
           ]]


          you can use it in the MIGX-tpl with:

          [[+property.title]]

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

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 36926
            • 701 Posts
            Awesome, thanks Bruno. Thats exactly what need.

            Thanks

            B
              • 36926
              • 701 Posts
              Looks like i may of jumped the gun a bit as can't seem to get that to work. Still rendering out empty for the value.
              This is what my codes looking like.
              My getImageList call thats in a getResource template
              [[!getImageList? &tvname=`fancyBox` &tpl=`image.Tpl` &gallery=`[[+pagetitle]]` &docid=`[[+id]]`]] 
              
              


              and my migx tpl code

              <li><a rel="[[+property.gallery]]" href="[[+image]]"><img alt="" src="[[+image:phpthumbof=`w=240&h=90&zc=1`]]"></a></li>
              


              Do i need to make any changes to the TV used for MIGX?

              Thanks
                • 4172
                • 5,888 Posts
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 36926
                  • 701 Posts
                  Quote from: Bruno17 at Dec 22, 2011, 11:44 AM
                  may be you need a new getImageList-snippet from github
                  https://raw.github.com/Bruno17/multiItemsGridTV/master/core/components/migx/elements/snippets/snippet.getImagelist.php

                  Hey Bruno thanks for the help, that seems to of worked, but there's a new issue now, for some reason it's now only pulling in 1 migx row, which happens to be last in the list.

                  Is it just the snippet code i need to update or are there any files etc that need changing as well.

                  The migx version (v1.10) was only download 2 days ago via the package management.
                  Also i'm running revo 2.1.3 at the moment, not sure if that will make any difference or not.

                  Thanks
                    • 36926
                    • 701 Posts
                    The problem seems todo with line 52 of the latest getImageList snippet
                    $placeholdersKeyField = $modx->getOption('placeholdersKeyField', $scriptProperties, 'MIGX_id');
                    


                    If i change this back to the code that was in my original snippet it works fins.
                    Line of code from old snippet
                    $placeholdersKeyField = $modx->getOption('placeholdersKeyField', $scriptProperties, false);
                    
                      • 4172
                      • 5,888 Posts
                      yeah, the MIGX from github has a new autogenerated field. It's MIGX_id, a unique id for each item,
                      This field doesn't exist in the version from repo.

                      you can try &placeholdersKeyField=`0` or &placeholdersKeyField=`idx` in the snippet-call.

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

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!

                      This discussion is closed to further replies. Keep calm and carry on.