Reputation: 139
I have this springboot thymeleaf html,
@GetMapping("/rest")
public String list(Model theModel) {
// add to the spring model
theModel.addAttribute("list", theModel);
return "menu-list";
}
menu-list.html,
<tbody>
<tr th:each="List : ${list}">
<td th:text="${list.name}" />
<td th:text="${list.position}" />
<td th:text="${list.homepage}" />
</tr>
</tbody>
I need to put link on the, td th:text="${list.homepage}". Like href=www.mydomain.com.
I have no idea what to do?
Upvotes: 0
Views: 96
Reputation: 474
Can you please try to use the following code:
<td><a th:href="@{${list.homepage}}" th:text="homepage"/></td>
Upvotes: 2