<#if parentId?has_content>
    <ul>
    <@cms.categoryList advanced=true parentId=parentId pageSize=500>
        <#list page.list as a>
            <li<#if a.childIds?has_content> _src="cmsContent/lookup.html?parentId=${a.id}<#if modelIds?has_content>&modelIds=${(modelIds?url)!}&showModel=true</#if>&field=${(field?url)!'relatedContentId'}&titleField=${(titleField?url)!'title'}"</#if>>
                <a href="cmsContent/lookup_list.html?categoryId=${a.id}<#if modelIds?has_content>&modelIds=${(modelIds?url)!}&showModel=true</#if>&field=${(field?url)!'relatedContentId'}&titleField=${(titleField?url)!'title'}" class="exclude-translate" target="ajax" rel="content_list">${a.name!}</a>
            </li>
        </#list>
    </@cms.categoryList>
    </ul>
<#else>
<div class="pageContent">
    <div class="unitBox leftPageContent">
        <ul class="tree treeFolder" layoutH>
            <li>
                <a href="cmsContent/lookup_list.html" target="ajax" rel="content_list"><@t.page 'category'/></a>
                <ul>
                    <@cms.categoryList advanced=true parentId=parentId pageSize=500>
                        <#list page.list as a>
                            <li<#if a.childIds?has_content> _src="cmsContent/lookup.html?parentId=${a.id}<#if modelIds?has_content>&modelIds=${(modelIds?url)!}&showModel=true</#if>&field=${(field?url)!'relatedContentId'}&titleField=${(titleField?url)!'title'}"</#if>>
                                <a href="cmsContent/lookup_list.html?categoryId=${a.id}<#if modelIds?has_content>&modelIds=${(modelIds?url)!}&showModel=true</#if>&field=${(field?url)!'relatedContentId'}&titleField=${(titleField?url)!'title'}" class="exclude-translate" target="ajax" rel="content_list">${a.name!}</a>
                            </li>
                        <#else>
                            <li><a><@t.page 'empty_directory'/></a></li>
                        </#list>
                    </@cms.categoryList>
                </ul>
            </li>
         </ul>
    </div>
    <div id="content_list" class="unitBox rightPageContent">
        <#include "lookup_list.html"/>
    </div>
</div>
</#if>