function if_last_category($atts, $thing) { global $thiscategory; assert_category(); return parse(EvalElse($thing, !empty($thiscategory['is_last']))); }
function if_active_category($atts, $thing) { global $thiscategory, $c; assert_category(); extract(lAtts(array('dir' => 'none'), $atts)); switch ($dir) { case 'none': return parse(EvalElse($thing, $thiscategory['name'] == $c)); case 'trunk': case 'leaf': case 'both': // FIXME: Check for any active descendant/ancestor in cat tree return parse(EvalElse($thing, $thiscategory['name'] == $c)); } return ''; }