1
votes

I want to use a Thymeleaf dialect inside a Thymeleaf dialect but couldn't. I've tried this but didn't work as well:

<h2 th:text="|${response.name} has: |">
Dunie has: 
    <span th:text="|-${response.size}-|" class="paleo">-4-</span>
</h2>

th:text of h2 removes everything inside it. I want to get something like that after rendering:

<h2>
Philie has: 
    <span class="paleo">-3-</span>
</h2>

So, how can I do what I aim?

1

1 Answers

0
votes

Use th:block http://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#synthetic-thblock-tag

<h2>
    <th:block th:text="|${response.name} has: |" />
    <span th:text="|-${response.size}-|" class="paleo"></span>
</h2>