以下代码由王磊提供:
<{if $categoryup eq 0 }>
<{getcategories rootcategory="$category" template='
<li><a href=()[url]() class=()cate_$id()>[category]</a></li>
'}>
<{else}>
<{getcategories rootcategory="$categoryup" template='
<li><a href=()[url]() class=()cate_$id()>[category]</a></li>
'}>
<{/if}>
以上代码未在akcms其他版本测试。