<select name="pub_parent" id="parent">
[[!getResources?
&parents=`2`
&tpl=`NP Parent`
&where=`{"isfolder:=":"1"}`
&depth=`4`
&sortby=`alias`
&sortdir=`ASC`
&limit=`0`
&includeContent=`0`
&resources=`-33`
]]
</select>
<option[[!getReqParam:is=`[[+id]]`:then=`selected="selected"`:else=``? &name=`parent`]] value="[[+id]]">[[+pagetitle]]</option>
&parentid=`[[!getReqParam? &name=`pub_parent`]]`
This question has been answered by BobRay. See the first response.
[[!NewPublisher? &parents=`[[getParents? &parent=`2`]]` &parentId=`12` ]]
/* getParents snippet */
$parentId = $modx->getOption('parent', $scriptProperties, '');
$parentObj = $modx->getObject('modResource', $parentId);
if ($parentObj) {
$final = array();
$final[] = $parentId; /* Might not want this it includes
the parent id in the list */
$docs = $parentObj->getMany('Children');
foreach ($docs as $doc) {
$docId = (int) $doc->get('id');
if ($doc->get('isfolder') && ($docId != 33)) {
$final[] = $doc->get('id');
}
}
}
return implode(",", $final);
[[!NewsPublisher?
&parentIds=`3,12,24,35,46`
&parent=`12`
etc. . .
]]
the alternative hard-coded example above doesn't seem to work either.