Reputation: 431
In the GSP i want to pass to the agrs
a link in <g:message code='myCode' args='link'>
, i tried args="${createLink(controller:'myCon',action:'myAc')}"
but this is not working.
Any ideas?
Upvotes: 1
Views: 479
Reputation: 24776
Should be easy enough with the following in your messages.properties
file
my.message.key=Just a link to <a href="{0}">Something</a>
and then calling it like this:
<g:message code="my.message.key" args="[createLink(controller: 'foo', action: 'baz')]" />
Keep in mind that arguments for message codes are an array, thus the brackets used above.
Upvotes: 3