freemarker include指令传递参数

示例

/common/copyright.ftl:

Copyright 2001-2002 ${me}<br>
All rights reserved.

模版:

<#assign me = "Juila Smith">
<h1>Some test</h1>
<p>Yeah.
<hr>
<#include "/common/copyright.ftl">

运行结果:
freemarker include指令传递参数

参考

https://freemarker.apache.org/docs/ref_directive_include.html

猜你喜欢

转载自blog.csdn.net/jiangshanwe/article/details/78946150