1

$optionsこのメソッドで使用できるパラメーターは何ですか?

array getChildIds ([integer $id = null], [integer $depth = 10], [array $options = array()])

子供のエイリアスが「f」ではないすべての子供 (深さ = 3) を取得する方法を探しています。

4

1 に答える 1

4

これを使って:

<?php
$id = 123;
$depth = 3;

$ids = $modx->getChildIds($id, $depth);
$docs = $modx->getCollection('modResource', array(
    'id:IN' => $ids
    ,'alias:!=' => 'f'
));
$output = '';
foreach ($docs as $doc) {
    $output .= $doc->get('pagetitle') . '<br/>';
}

return $output;
于 2012-11-26T19:56:21.043 に答える