I frequently use
<myElem th:if="${myVar}" th:text="${myVar}">dummy</myElem>
Is there a more concise syntax with less repetition?
No, this is the short syntax you can use to render an html tag