#macro templateTree field filepath="">
    <@tools.fileList path=filepath>
        <#list list as a>
        
            <#local path=filepath?has_content?then(filepath+'/','')+a.fileName/>
        <#if a.directory>
            ${a.fileName}
            
                <@templateTree field path/>
            
#if>
        
        <#else>
            <@t.page 'empty_directory'/>
        #list>
    @tools.fileList>
#macro>