Create grails <g: link>
I have a problem with the tag <g:link>
.
When i use
<g:link namespace="print" controller="home" action="terms">Terms & Conditions</g:link>
Creates the following link
<a href="/app/print/home/terms">Terms & Conditions</a>
But I would like to create a link like
<a href="/app/print/home/terms#testValue">Terms & Conditions</a>
How can this be achieved?
I tried using "$ {createLink (controller: 'home', action: 'terms')} , but it doesn't support the namespace attribute.
+3
source to share
1 answer
Link: grails-doc
You can use a snippet (often called an anchor tag).
<g:link namespace="print" controller="home" action="terms" fragment="testValue">Terms & Conditions</g:link>
+4
source to share