我是靠谱客的博主 干净铃铛,这篇文章主要介绍freemarker自定义标签(一),现在分享给大家,希望可以做个参考。

freemarker自定义标签


1、自定义标签说明

     宏变量存储模板片段可以被用作自定义指令macro


2、示例说明

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>freemarker自定义标签</title>

  </head>
  
  <body>
     <#--freemarker自定义标签-->
	 <#macro write>
	     repeat("张三丰",3)
	 </#macro>
	 
	 <@write/>
  </body>
</html>

3、示例结果

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>freemarker自定义标签</title>

  </head>
  
  <body>
     	 
	     repeat("张三丰",3)
  </body>
</html>


最后

以上就是干净铃铛最近收集整理的关于freemarker自定义标签(一)的全部内容,更多相关freemarker自定义标签(一)内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(114)

评论列表共有 0 条评论

立即
投稿
返回
顶部