Reputation: 163
I can't make [[!HasChildren]] & [[*isfolder]] work with modx 2.3, it always display the same result with the checkbox container checked... Is it normal ? Is there an alternative ?
[[*isfolder:is=`1`:then=`toto`:else=`titi`]]
Upvotes: 0
Views: 489
Reputation: 2281
Snippet get_childrens_count
<?php
$count = 0;
$criteria = array(
'parent' => $modx->resource->get('id'),
'deleted' => false,
'published' => true,
);
$count = $modx->getCount('modResource', $criteria);
return $count;
usage:
[[!get_childrens_count:gt=`0`:then=`toto`:else=`titi`]]
Upvotes: 1