We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    hi there,

    I usually build up my tables manually by looping through a set of results inside a snippet and return the table. Is there an easier way of doing this using a template variable? I see a datagrid type and was wondering if anyone could point me in the right direction.

    Cheers,

    Justin.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Not 100% positive about this since I’ve never used it, but I believe you can use a TV with @SELECT binding in the input, and give it an output widget of datagrid.
        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
        • 25663 MODX Staff
        • 12,272 Posts
        Datagrid output widgets do work, but are tricky to get them working properly. I think I posted my eventual success using an @FILE binding on the forums about 8 or so months ago.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 15083
          • 697 Posts
          Thanks guys......after trawling the posts...its really quite easy....and documented wink

          http://modxcms.com/datagrid-widget.html (doh!)

          You just @SELECT the table
          and type in the column names....thats all there was to it!!!!

          Once again modx scores highly in my "ease of use" CMS list!!
          Excellent work on the latest version....