首页 > 其他 > 详细

freemarker自定义标签

时间:2014-06-09 23:07:47      阅读:417      评论:0      收藏:0      [点我收藏+]

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自定义标签,布布扣,bubuko.com

freemarker自定义标签

原文:http://blog.csdn.net/you23hai45/article/details/28724121

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!