We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26799
    • 177 Posts
    I’m not sure I understand how the TV system USES "@EVAL data bindings",

    I’ve tried the following code to produce a dropdown list of "style sheets" to send to a snippet I made to parse a comma delineated list.

    @EVAL array getDocumentChildren($id=-38, $active=1, $deleted='0', $fields='id');



    Would this only create the array, or would it output the values of the array?
    • An @EVAL binding will act as if it were a <?php ... ?> insert in your document, the code will be "evaluated" by the PHP parser as regular PHP code. So it will produce exactly what the same PHP code would produce in a stand-alone file. (somebody please correct this if I’m wrong wink )
        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