<#if isRoot> [{ "text": "<@s.m "template.root"/>", "classes": "folder" <#if tplList?size gt 0>, "expanded": true, "children": [ <#list tplList as tpl> { "id": "${}", "text": "${tpl.filename}", "classes": "${?string('folder','file')}", "hasChildren": ${?string('true','false')} }<#if tpl_has_next>, ] }] <#else> [ <#list tplList as tpl> { "id": "${}", "text": "${tpl.filename}", "classes": "${?string('folder','file')}", "hasChildren": ${?string('true','false')} }<#if tpl_has_next>, ]