I have a problem using <g:link> tag.
When I use
<g:link namespace="print" controller="home" action="terms">Terms & Conditions</g:link>
It creates the following link
<a href="/app/print/home/terms">Terms & Conditions</a>
But I would like to create a link such as
<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 does not support namespace attribute.
Ref: grails-doc
You may use fragment (often called anchor tag).
<g:link namespace="print" controller="home" action="terms" fragment="testValue">Terms & Conditions</g:link>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With