We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29697
    • 24 Posts
    Can anyone shed any light on how to actually implement a widget.

    the online docs do a good job of explaining what they are but i can find no indication anywhere as to how you use them

    my interest is in the use of the datagrid widget, but how do i use the thing?
      • 18397
      • 3,250 Posts
      Widgets are used to handle the output of TVs as of 0.9.1. When creating a TV and setting a widget, you can determine the markup it returns in the browser.

      I believe there is a thread in the forums around here somewhere about the datagrid widget...
        • 29697
        • 24 Posts
        Yeah great but how do you do it??????
          • 18367
          • 834 Posts
          Hmmm, re datagrid

          nothing much in the documentation.

          Nothing in the forums.

          Nothing in the wiki.

          And no answers to "thegent’s" original question.

          Does it even exist?

          Nobody seems to know much about it.

          Very strange.

          Still it would be nice to know where it lives and how to call it. smiley
            Content Creator and Copywriter
            • 26903
            • 1,336 Posts
            For 0.9.6.1 the data grid widget is implemented in the two class files /manager/includes/controls datagrid.class.php and datasetpager.class.php. The classes are instantiated in the datagrid case of function getTVDisplayFormat in file /manager/includes/tmplvars.format.inc.php.

            Perusing these may shed some detailed light on its operation.
              Use MODx, or the cat gets it!
              • 18367
              • 834 Posts
              Thanks Shamblett,

              that makes it a little clearer, although I think I’ll wait until someone provides a tute or simple worked example before I take this any further.

              At the moment it just seems far too complicated.
                Content Creator and Copywriter