Head and Title in Thymeleaf

前端 未结 7 1159
我寻月下人不归
我寻月下人不归 2021-01-31 18:23

I\'m a Thymeleaf beginner. I started with a common layout page:

fragments/layout.html



        
7条回答
  •  迷失自我
    2021-01-31 19:18

    This is the best solution i found:

    1. Create a block fragment

    
    
        
        
        
        
    
        
        
    
        
        
    
        
        
    
    

    1. Do this in all the heads for your html pages

    
        
    Example

    So in the end you can have one fragment containing all the scripts and css you need in all your pages and just add it to your headers, while still being able to ad some custom css, scripts or what ever

提交回复
热议问题