isfolder& HasChildren不使用modx 2.3

时间:2015-07-22 10:05:11

标签: modx modx-revolution

我无法[[!HasChildren]]& [[* isfolder]]使用modx 2.3,它会在复选框容器检查时显示相同的结果......这是正常的吗?还有其他选择吗?

[[*isfolder:is=`1`:then=`toto`:else=`titi`]]

1 个答案:

答案 0 :(得分:1)

摘录function checkForm() { document.getElementById("frm1").onsubmit = function() { if (document.getElementById("lastname").value === "") { showError(); return false; } else if (document.getElementById("postCod").value === "") { showError(); return false; } else { return true; } } }

get_childrens_count

用法:

<?php
$count = 0;
$criteria = array(
    'parent' => $modx->resource->get('id'),
    'deleted' => false,
    'published' => true,
);
$count = $modx->getCount('modResource', $criteria);
return $count;