1
I have an object with two attributes, one is id and the other is strring type attribute called text type "TEXT" (postgres database) which is used to store the text of a customer post.
When the app loads these posts on the page,not to get a very long text I would like to make a summary of this text.
I was able to do this using JSP, in an easy way, using the forTokens
.
How to do the same as the code below using the Thymeleaf?
<p class="post-texto">
<c:forTokens var="resumo" items="${p.texto}" delims=" " begin="0" end="60">
${resumo}
</c:forTokens><a href="<c:url value="/${p.link}" />">[Continue lendo]</a>
</p>
I searched but found nothing similar to forTokens on Thymeleaf.