<#if parent?has_content>
<@cms.categoryList advanced=true parentId=parent pageSize=500>
<ul>
    <#list page.list as a>
        <li<#if a.childIds?has_content> _src="cmsCategory/list.html?parent=${a.id}"</#if>>
            <a href="cmsCategory/category_list.html?parentId=${a.id}&lang=${lang!}" target="ajax" rel="categoryBox" class="exclude-translate">${(a.name)!}</a>
        </li>
    </#list>
</ul>
</@cms.categoryList>
<#else>
<div class="pageContent">
    <div class="leftPageContent">
        <div class="card">
            <ul class="tree treeFolder" layoutH>
                <li>
                    <a href="cmsCategory/category_list.html?lang=${lang!}" target="ajax" rel="categoryBox"><@t.page 'category.parent'/></a>
                    <ul>
                        <#if 'true'=(siteAttribute.enable_multilingual)!>
                        <li>
                            <@cms.languageList>
                            <#list list as l>
                                <a href="cmsCategory/list.html?lang=${l.id.code}"${(l.id.code=(lang!(siteAttribute.default_language)!))?then(' class="red"','')?no_esc} data-change-title="false" target="navTab" rel="cmsCategory/list">${(l.name)!}</a>
                            </#list>
                            </@cms.languageList>
                        </li>
                        </#if>
                        <@cms.categoryList advanced=true pageSize=500>
                            <#list page.list as a>
                                <li<#if a.childIds?has_content> _src="cmsCategory/list.html?parent=${a.id}&lang=${lang!}"</#if>>
                                    <a href="cmsCategory/category_list.html?parentId=${a.id}&lang=${lang!}" class="exclude-translate" target="ajax" rel="categoryBox">${(a.name)!}</a>
                                </li>
                            </#list>
                        </@cms.categoryList>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div id="categoryBox" class="rightPageContent">
        <#include "category_list.html"/>
    </div>
</div>
</#if>