We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36493
    • 64 Posts
    I wish to make a listbox(multiselect) tv of child pages:

    I originally tried
    @SELECT `pagetitle`, `id` FROM `[[+PREFIX]]site_content` WHERE `parent`=[[+ID]] 


    But [[+id]] doesn’t work ??


    so I tried
    @EVAL return $modx->runSnippet('productlistbox');


    snippet:productlistbox:
    <?php
    $parents = $modx->resource->get('id');
      //$parents = 1024;
        
      $params = array('parents' => $parents,
                      'tpl' =>'productinput',
                      'outputSeparator' => '||',
                      'limit' => 20,
                      'showHidden' => 1);
      
     $output = $modx->runSnippet('getResources',$params);
      
     return $output;


    chunk:productinput:
    [[+pagetitle]]==[[+id]]​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​


    But this also doesn’t work.
    but it does output correctly in the front end??

    Many thanks in advance
      |
      • 36493
      • 64 Posts
      Solution found grin

      outlined here:http://modxcms.com/forums/index.php/topic,62232.0.html


      Many thanks,
        |