我如何 show/hide FreeMarker 模板 FTL

How can I show/hide FreeMaker template FTL

我是 FreeMaker Template 的新手,在下面的示例中,我只想显示 <@greet person="${name}"!/> 宏 10 秒,然后需要将其删除,知道我该怎么做?

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>${title} | Kweet</title>
</head>
<body>

<@greet person="${name}"!/>


<#include "/copyright_footer.html">
</body>
</html>

<#macro greet person color="black">
  <font size="+2" color="${color}">Hello ${person}!</font>
</#macro>

您可以使用 JavaScript(您将其放入模板)来做到这一点。它与 FreeMarker 无关,因为它只在 发送到浏览器之前 生成页面。