I\'m a Thymeleaf beginner. I started with a common layout page:
fragments/layout.html
According to the documentation th:include includes the content of a fragment into the including div. So you will get the title of template. You can use an attribute for the page title as follows and set its value in each controller.
${pagetitle}
Alternatively you can use layout dialects to achieve the same as described in here. Thymeleaf layout dialect and th:replace in head causes title to be blank