#function useFile filePath fileName> <#assign fileSuffix = fileName?keep_after_last('.')/> <#switch fileSuffix> <#case 'css'> <#return r''/><#break> <#case 'js'> <#return r''/><#break> <#case 'jpg'> <#case 'png'> <#case 'bmp'> <#case 'gif'> <#return r''/><#break> <#case 'ico'> <#return r''/><#break> <#case 'ogg'> <#case 'webm'> <#case 'mpeg'> <#case 'mpg'> <#case 'mov'> <#case 'rm'> <#case 'ram'> <#case 'avi'> <#case 'wmv'> <#case 'mp4'> <#return r''/><#break> <#case 'wav'> <#case 'acc'> <#case 'mid'> <#case 'midi'> <#case 'wma'> <#case 'mpga'> <#case 'mp3'> <#return r''/><#break> <#case 'rar'> <#case 'zip'> <#case 'html'> <#return r''+fileName+''/><#break> <#default> <#return r'${site.sitePath}'+filePath/> #switch> #function > 使用 名称 修改日期 创建日期 文件大小 <@_webFileList path=path> <#if path?has_content> 返回上级.. #if> <#list list as a> <#assign filePath=path?has_content?then(path+'/','/')+a.fileName/> <#if !a.directory> 选择 #if> <#if a.directory> ${a.fileName} <#else> ${a.fileName} #if> ${a.lastModifiedTime?datetime} ${a.creationTime?datetime} <@t.fileSize a.size/> #list> @_webFileList>