Evaluate variable not in th: field namespace

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Evaluate variable not in th: field namespace

keberts
Is it possible for Thymeleaf to do a simple variable replacement when a ${varableName} is not found within a th:* attribute? Similar to what FreeMarker does.

I would like to add Thymeleaf to a service that supports a database store of templates in which all existing templates support a simple string replacement. I need to be able to maintain backwards compatibility with all existing messages. If I wrote special logic to handle it; then there would be a significant amount of parsing required to ensure that the variable is not placed within a th:* attribute. Is there someway Thymeleaf can be specialized to support this capability?