如何在tymeleaf布局装饰器中添加页面特定的脚本标签?

时间:2018-04-28 13:12:44

标签: spring-mvc thymeleaf

让我们说,我有以下布局页面tmeplate.html

<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
...
<body>
   ...
   <section layout:fragment="custom-content">
     DEFAULT CONTENT GOES HERE
   </section>
   ...
</body>
</html>

我的index.html页面如下所示

<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
   layout:decorator="template">
...
<body>
  ...
  <section layout:fragment="custom-content">
      PAGE SPECIFIC CONTENT GOES HERE
  </section>
  ...
</body>
</html>

那么,如何在结束 正文 标记之前立即添加index.html页面特定的 脚本 标记?

0 个答案:

没有答案
相关问题