using variables in thymeleaf code example
Example: how to create a variable in thymeleaf
You can use local variables. Declare an HTML element with a th:with attribute. For example
Related