We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7858
    • 97 Posts
    Hi, i'd like to create listbox TV with values loaded from MIGx TV of some resource.

    So I use @SELECT value FROM modx_site_tmplvar_contentvalues WHERE id=14

    and become array:

    [{"MIGX_id":"1","image":"assets/data/images/apr.jpg","description":"First Image"},{"MIGX_id":"2","image":"assets/data/images/veb.jpg","description":"Second Image"},{"MIGX_id":"3","image":"assets/data/images/jun.jpg","description":"Third Image"},{"MIGX_id":"4","image":"assets/data/images/sd02.jpg","description":"Fourth Image"}]

    can it be processed do display descriptions in listbox?

    thx
      • 4172
      • 5,888 Posts
      you will need to have snippet, which returns the values in this format:

      Fist Image||Second Image||Third Image||Fourth Image


      and use @EVAL - binding to call that snippet:

      @EVAL return $modx->runSnippet('mySnippet',array('param1'=>'value1','param2'=>'value2'));


        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 7858
        • 97 Posts
        Thx, that's what I need!