Grails: How to include an html link inside a <g:message> default attribute?
- by Christoph
Hi,
I am starting with Grails and want to have one page with multilanguage content.
I started using the tag which works fine.
But here is what I want to do:
I want to include the default text of the default language right in the text, to avoid switching back and forth in between files.
<g:message code="homepage.feature.headline1" default="This is an english text" />
The above works.
But now I a have a message which should include a link like this:
<g:message code="homepage.feature.headline1" default="This is an english text with <a href='somefile.html'>a link</a>" />
This gives me an exception:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Grails tags were not closed! [[<g:message>]] in GSP
How can I achieve that I can include a link there? I have tried escaping the < brackets but still no luck.
I really would like to avoid splitting up this one sentence into multiple smaller sentences.
Thanks
Christoph