We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28300
    • 60 Posts
    Действительно, в коде была ошибка:

    <?php
    $docid = isset($docid) ? intval($docid) : $modx->documentIdentifier;
    $depth = isset($depth) ? intval($depth) : 0;
    $isfolder = isset($isfolder) ? intval($isfolder): 0;
    $tpl = isset($tpl) ? $tpl: -1;
    $published = isset($published) ? intval($published): 1;
    $davailable = $modx->getChildIds($docid, $depth);
    
    if ($davailable){
        $where = ($tpl > 0) ? 'template='.$tpl : 'isfolder='.$isfolder;
        $dcount = $modx->getDocuments($davailable, $published, 0, 'id', $where); 
        return count($dcount);
    }
    return 0;
    ?>
      • 23146
      • 0 Posts
      спасибо, теперь работает супер.
        • 36825
        • 29 Posts
        Помогите пожалуйста вывести значение обернутое в span через шаблон в чанке.