<#if extend.multiple>
    <@cms.category ids=value><#assign values=map/></@cms.category>
    <#if 'view'=type>
        <#if values?has_content><#list values as k,v><p>${k!}:${(v.name)!}</p></#list></#if>
    <#else>
        <table class="list nowrap itemDetail" addButton="<@t.page 'button.new_line'/>">
            <thead>
                <tr>
                    <th width="250"<#if 'customform'!=type> type="lookup" name="${extend.id.code}_categoryName" fieldClass="<#if extend.required>required</#if>" size="30" fieldAttrs='{"readonly":"readonly","width":920,"height":580}' lookupUrl="cmsCategory/lookup.html?field=${inputName?url}&nameField=${extend.id.code?url}_categoryName" lookupGroup="" lookupPk="${inputName}"</#if>><@t.page 'category'/></th>
                    <th width="60" type="delAndSort"><@t.page 'operate'/></th>
                </tr>
            </thead>
            <tbody>
                <#if values?has_content>
                    <#list values as k,v>
                    <tr<#if 'customform'!=type> class="unitBox"</#if>>
                        <td>
                            <input name="${inputName}" value="${k!}" type="hidden"/>
                            <input name="${extend.id.code}_categoryName" readonly="readonly" size="30" value="${(v.name)!}" type="text" class="<#if extend.required>required</#if>"/>
                            <a class="btnLook" href="cmsCategory/lookup.html?field=${inputName?url}&nameField=${extend.id.code?url}_categoryName" width="920" height="580" lookupGroup=""><@t.page 'category.select'/></a>
                        </td>
                        <td>
                            <a href="javascript:;"<#if 'customform'=type> onclick="this.parentElement.parentElement.remove()"<#else> class="btnDel"</#if>><@t.page 'button.delete'/></a>
                            <#if 'customform'!=type><a href="javascript:;" class="btnUp"></a><a href="javascript:;" class="btnDown"></a></#if>
                        </td>
                    </tr>
                    </#list>
                </#if>
                <#if 'customform'=type>
                    <tr>
                        <td colspan="2"><a href="javascript:;" onclick="var thisNode=this.parentElement.parentElement;var tr = document.createElement('tr');tr.innerHTML='<td><input name=\'${inputName}\' type=\'number\' size=\'30\'<#if extend.maxlength?has_content> maxlength=\'${extend.maxlength}\'</#if><#if extend.required> required=\'required\'</#if>/></td><td><a href=\'javascript:;\' onclick=\'this.parentElement.parentElement.remove()\'><@t.page 'button.delete'/></a></td>';thisNode.parentElement.insertBefore(tr,thisNode);"><@t.page 'button.new_line'/></a></td>
                    </tr>
                </#if>
            </tbody>
        </table>
    </#if>
<#else>
    <@cms.category id=value><#assign values=object/></@cms.category>
    <#if 'view'=type>
        ${(value)!}:${(values.name)!}
    <#else>
        <input name="${inputName}" value="${(value)!}" type="hidden"/>
        <input name="${extend.id.code}_categoryName" readonly="readonly" size="30" value="${(values.name)!}" type="text" class="<#if extend.required> required</#if>"/>
        <a class="btnLook" href="cmsCategory/lookup.html?field=${inputName?url}&nameField=${extend.id.code?url}_categoryName" lookupGroup="" width="920" height="580"><@t.page 'category.select'/></a>
    </#if>
</#if>