Thymeleaf layout dialect and th:replace in head causes title to be blank

前端 未结 3 499
我寻月下人不归
我寻月下人不归 2021-01-12 06:30

I\'m following this tutorial: http://www.thymeleaf.org/doc/layouts.html (got to Thymeleaf Layout Dialect section). In there you can find an example:



        
3条回答
  •  孤街浪徒
    2021-01-12 06:59

    I think I found a slightly less verbose way to for using th:replace and th:fragment together, e.g. to include common metadata and static resource includes in your pages.

    Put the th:remove="tag" in the fragment definition, so you don't have to repeat the th:remove="tag" everytime including it.

    fragment_head.html

    
    
        
        
        
        
    
    
    

    mypage.html

    
        
    
    

提交回复
热议问题