Home > Back-end >  How to add parameter to this thymeleaf link, if I need to have an id parameter also?
How to add parameter to this thymeleaf link, if I need to have an id parameter also?

Time:02-04

I need id to be there and this parameter sortField=${sortField}. How can this be done?

 th:href="@{/admin/orders/decline/{id}(id=${order.id})}"

CodePudding user response:

You can just add it as an extra parameter (without a placeholder).

th:href="@{/admin/orders/decline/{id}(id=${order.id},sortField=${sortField})}"

See the last example here.

  •  Tags:  
  • Related