We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 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
        • 40045
        • 534 Posts
        Is the renderChunk feature only usable with submigx (migx in migx) fields? I just tried to use the renderChunk feature with a "normal" single MIGX and use &tvname=`nameOfMigxTV` instead of &value=`[[+submigxfield]]`. But this will not display anything in the row, it's just empty^^...am I maybe missing something, or can this just not work like this yet?

        I also noticed, that when I use something like "col.title" as fieldname for a migx input field, then it's not possible to save the data item, seems because of the dot (.) in the name, when I just call it "title" then it works...is that a bug or is there a naming convention that doesn't allow this? [ed. note: exside last edited this post 11 years, 3 months ago.]
          • 40762
          • 54 Posts
          Hey Bruno,

          when you see

          create just one Renderoptions in the grid below.

          what do you mean exactly? Because I cant find any grid. how should it be looking like. I have updated to the latest version on github but maybe it hasnt been updated right.

          thanks
            Marc-Andre Audet
            • 4172
            • 5,888 Posts
            It should look like my attachment
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 40762
              • 54 Posts
              Ok so I really need to create my TV through MIGXdb. I will look over that.

              Thanks 1000 times Bruno you are being more than helpful
                Marc-Andre Audet
                • 40045
                • 534 Posts
                Is it possible to display TV values in a renderChunk? I have setup based on the childresources tutorial and I would like to show a cross/tick if a TV field is empty of not, tried to add chunk renderer as follows:

                [[+content-link:isnot=``:then=`
                <img title="verlinkt" alt="" src="/assets/components/migx/style/images/tick.png" />
                `:else=`
                <img title="nicht verlinkt" alt="" src="/assets/components/migx/style/images/cross.png" />
                `]]
                


                while content-img is the TV, this always shows the cross, so I just tried the naked [[+content-link]] placeholder, but it doesn't output anything, also tried [[+tv.content-link]] and [[+tv_content-link]], but no success =)...so is this possible at all? If I edit the childresources via the migxdb grid, the link has some text in it...
                  • 41647
                  • 49 Posts
                  Quote from: exside at Apr 20, 2013, 05:17 PM
                  Is it possible to display TV values in a renderChunk? I have setup based on the childresources tutorial and I would like to show a cross/tick if a TV field is empty of not, tried to add chunk renderer as follows:

                  [[+content-link:isnot=``:then=`
                  <img title="verlinkt" alt="" src="/assets/components/migx/style/images/tick.png">
                  `:else=`
                  <img title="nicht verlinkt" alt="" src="/assets/components/migx/style/images/cross.png">
                  `]]
                  


                  while content-img is the TV, this always shows the cross, so I just tried the naked [[+content-link]] placeholder, but it doesn't output anything, also tried [[+tv.content-link]] and [[+tv_content-link]], but no success =)...so is this possible at all? If I edit the childresources via the migxdb grid, the link has some text in it...

                  stuck on the same thing...
                  I'm also working on the base of the childresources tutorial.
                  Now i have a migx-grid with list of resources and the ids are displayed.
                  I tried renderChunk to display the pagetitle instead, but I can't get it to work.
                  The grid doesn't save any values anymore, the db says just [].
                  But rhe same renderer, with the same chunk is working fine on another (but nested) grid. May this be the problem? Does this only work on nested grids?

                  Chunk "makePagetitle":
                  [[!getResourceField? &id=`[[+resource]]` &field=`pagetitle`]]


                  Migx--column-config:
                  [{"MIGX_id":"1","header":"Artikel","dataIndex":"resource","width":"","sortable":"false","show_in_grid":"1","renderer":"this.renderChunk","clickaction":"","selectorconfig":"","renderoptions":"[{\"MIGX_id\":\"1\",\"name\":\"makePagetitle\",\"value\":\"articleId\",\"clickaction\":\"\",\"handler\":\"\",\"image\":\"\"}]"}]


                  any idea?

                  thanks,
                  janein
                  • If you use an own getlist processor, you have to insert
                    $rows = $modx->migx->checkRenderOptions($rows);

                    at the end of that processor to get the chunk renderer to work.
                      • 42838
                      • 28 Posts
                      give me valid example configuration for renderChunk, please. I set:

                      [
                      {"header": "ID", "sortable": "true", "dataIndex": "persone"},
                      {"header": "Сотрудник", "sortable": "true", "dataIndex": "persone", "renderer": "this.renderChunk", "renderoptions": {"name":"idRender"} }
                      ]
                      


                      but it not work