<div class="ow-page-cates" id="ow_page_cates">
    {cate parent_id="{$content:root_id}"}
    <ul>
        <li class="n1"><a class="n1" href="{$site_hurl}<%=OW.DB.getFieldValueBySQL("SELECT [rootpath] FROM ow_content1 WHERE cid={$content:cid}")%>/">全部</a></li>
        {cate:loop}<li class="n1">
        <a class="n1" href="[cate:link]">[cate:name]{if:OW.int("[cate:children]")>0}<span class="caret"></span>{/if}</a>
            {if:OW.int("[cate:children]")>0}
                <div class="subcates">
                    {cate2 parent_id="[cate:cate_id]"}
                    <ul>
                    {cate2:loop}
                    <li class="sub"><a class="sub" href="[cate2:link]">[cate2:name]</a></li>
                    {/cate2:loop}
                    </ul>
                    {/cate2}
                </div>
            {/if}
        </li>{/cate:loop}
    </ul>
    {/cate}
</div>