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