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

    I’m trying to populate a ListBox Tv with page results from Ditto, so,


    Template Variable -

    Type: ListBox (multi-select)
    Input Option Values: @DOCUMENT 2



    Page2 - (returns all the pages in container id: 400)

    [[Ditto? &startID=`400` &tpl=`return_all_pages` ]]



    Chunk:"return_all_pages" - (splits it into the value == key)

    [+title+]==[+id+]||





    But it keeps returning the Ditto script in the Listbox and not running the Ditto Script.

    Any clues?

    Thanks,

    DanC
      • 11975
      • 2,542 Posts
      Hi,

      try with

      @EVAL $param=array(’startID’=>400,’tpl’=>’return_all_pages’); return $modx->runSnippet(’Ditto’,$params);

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 6420
        • 4 Posts
        How very clever!

        I can see how the code works, but I seem to be getting back a "<p>No documents found.</p>" in the box.

        Could running a snippet through @EVAL kill off certain default settings?