Multiple parameters in anchor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Multiple parameters in anchor

This post was updated on .
I have a simple anchor tag.

And I just have a few static parameters, but I can't figure out how to format the tag.

I've tried this:

<a th:href="@{index.htm(value=ABCamp;id=123)}">LINK</a>
Thymeleaf tells me this cannot be parsed.

Prior it didn't like the ampersands so I had to use amp;

Thanks in advance for any help.
Reply | Threaded
Open this post in threaded view

Re: Multiple parameters in anchor


You have to pass your parameters as a list of variable assignations, separated by commas. There is no need to include an ampersand, and your literals should be surrounded by single commas:

<a th:href="@{index.htm(value='ABC', id='123')}">LINK</a>