0

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?

Ricky Vene
  • 105
  • 1
  • 11

1 Answers1

2

Can you please try to use the following code:

<td><a th:href="@{${list.homepage}}" th:text="homepage"/></td>
Andrian Soluk
  • 474
  • 6
  • 12