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:
Finally, I've found a way to achieve what I wanted.
In layout file
tag must stay. All other tags I grouped with tag and annotated it as follows:
Layout Title will be replaced by Page Title!
In my html/components/head.htm file I had to remove
tag so it won't be duplicated after include.
...
This way head fragment is included in tag and thanks to
th:remove="tag"
tag gets removed and my final HTML output is:
My content title
...
Obviously, I removed NO TITLE TAG HERE message too, once I got it working.