We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Here's a beginning to understanding how Custom TVs work. My first attempt is a rather simple one, an advanced sortable list of checkboxes for selecting blocks to display in a sidebar.

    The bottom line is that while following a couple of rules, you use @INCLUDE <filename> as the input option for the TV, then do whatever you want in the included file. The file really is included, not processed through the eval() function, so it's very efficient. The data can be stored as delimited strings or as JSON-encoded arrays and objects. JQuery (or MooTools or whatever Javascript you prefer) bells and whistles are welcome.

    The true value is in creating a class file or library that both the TV and the display snippet use.

    Here's the beginning of my efforts, the results of at least four viewings of chucktrukk's remarkable video tutorials. http://sottwell.com/custom-tvs.html
      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