<#macro bread category>
    <#if category.parentId?has_content>
        <@cms.category id=category.parentId>
            <@bread object/>
            ${object.name} &gt;
        </@cms.category>
    </#if>
</#macro>
<div class="pageFormContent" layoutH>
    <ul class="tree treeFolder">
<@cms.categoryModelList modelId=modelId>
    <#list list as a>
        <@t.merge 'categoryIds' a.id.categoryId/>
    </#list>
    <@cms.category ids=t.categoryIds><#assign categoryMap=map/></@cms.category>
    <#list list as a>
        <li>
            <#if categoryMap[a.id.categoryId?string]?has_content>
                <a href="cmsModel/template.html?modelId=${modelId!}&categoryId=${a.id.categoryId}" class="exclude-translate" target="dialog" rel="categoryList" width="1200" height="580" title="<@t.page 'template.example'/>"><@bread categoryMap[a.id.categoryId?string]/> ${categoryMap[a.id.categoryId?string].name} <#if categoryMap[a.id.categoryId?string].extendId?has_content><@t.page 'content.extend_field'/></#if></a>
            </#if>
        </li>
    </#list>
</@cms.categoryModelList>
    </ul>
</div>
<script>
$('ul li a',$.pdialog.getCurrent()).on("click", function(){
    $.pdialog.closeCurrent();
});
</script>
<div class="formBar">
    <ul>
        <li><a class="button" href="cmsModel/template.html?modelId=${modelId!}" class="exclude-translate" target="dialog" rel="categoryList" width="1200" height="580"><@t.page 'template'/></a>
        <li><button type="button" class="button close"><@t.page 'button.close'/></button></li>
    </ul>
</div>