We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52411
    • 3 Posts
    Hi Modx Community,
    As the title says, i have a listbox field inside my migx var. The formtabs look like this:
    ...
    {
        "field":"category",
        "caption":"Kategorie",
        "inputTVtype":"listbox",
        "inputOptionValues":"@EVAL return $modx->runSnippet('getListEntries');"
     }
    

    ...
    As you can see above, I use a snipped to render the options of another migx var. Now I want to see the Options "lable" in my Grid columns, not the value, which is the id. I tried to invoke a snipped inside the grid columns but didnt came far. It was never invoked.
    The grid columns:

    {
        "header": "category", 
        "width": "50", 
        "sortable": "true", 
        "dataIndex":"category", 
        "renderer":"this.renderChunk", 
        "renderoptions": {
    	"name": "[[$tpl_categoryid_to_name]]"
        }
    }
    


    Anyone who can help me with that?


      • 4172
      • 5,888 Posts
      you could use a MIGX-configuration, created with the MIGX-configurator and use the renderchunk-tpl there.

      Or, you can try this fix:
      https://github.com/Bruno17/MIGX/pull/257
      https://github.com/Bruno17/MIGX/pull/257/files
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 52411
        • 3 Posts
        Hi Bruno, thanks for your reply. unfortunately the code don't work. I added the missing line an tried
        "renderoptions": "[{\"name\":\"tpl_categoryid_to_name\"}]",

        The fix in line 83 in the class leads to a weird view. It shows the whole json object and also damages my layout in form tabs.

        is there another solution on the tv side without the MIGX-configurator? [ed. note: laslo89 last edited this post 10 years, 3 months ago.]
          • 52411
          • 3 Posts
          I just found that Link:
          https://forums.modx.com/thread/41006/migx---multiitemsgridtv-for-modx---revolution?page=12#dis-post-236932

          I tried to add a custom renderer. You wrote that i have to add the renderFirst prop insight migx.tpl. Can you show me the line, where i have to add it, please?