<#macro categoryTree parentId=''>
    <@_categoryList advanced=true parentId=parentId pageSize=500>
        <#list page.list as a>
            <li>
                <a href="cmsContent/lookup_list.html?categoryId=${a.id}&field=${field!'relatedContentId'}" class="exclude-translate" target="ajax" rel="content_list">${a.name!}</a>
            <#if a.childIds?has_content>
                <ul>
                    <@categoryTree a.id/>
                </ul>
            </#if>
            </li>
        <#else>
            <li><a><@t.page 'empty_directory'/></a></li>
        </#list>
    </@_categoryList>
</#macro>
<div class="pageContent">
    <div class="unitBox leftPageContent" layoutH>
        <ul class="tree treeFolder">
            <li>
                <a href="cmsContent/lookup_list.html" target="ajax" rel="content_list"><@t.page 'category'/></a>
                <ul>
                    <@categoryTree/>
                </ul>
            </li>
         </ul>
    </div>
    <div id="content_list" class="unitBox rightPageContent">
        <#include "lookup_list.html"/>
    </div>
    <div class="formBar">
        <ul>
            <li><button class="button" type="button" onclick="$.bringBack({'${field!'relatedContentId'}':'', url:'', title:'', description:''}); return false;"><@t.page 'button.clear_select'/></li>
            <li><button class="close button" type="button"><@t.page 'button.close'/></li>
        </ul>
    </div>
</div>