Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/docs/guide/gspLinks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Let's take a look at one more common GSP tag: `<g:link>`
include::{sourceDir}/grails-app/views/home/index.gsp[indent=0,lines="34..36"]
----

`<g:link>` renders an HTML `<a>` tag, but it has the advantage in that it allows you to specify your link target following Grails conventions, such as this example (using the `controller`, `action` and `id` attributes). `<g:link>` is also smart enough to follow our URL mappings, so if we change the URL mapping for `vehicle/show`, the `<g:link>` tag will still render the correct URL. There's many more attributes supported by `<g:link>` - see the http://docs.grails.org/latest/ref/Tags/link.html[Grails documentation] for more.
`<g:link>` renders an HTML `<a>` tag, but it has the advantage in that it allows you to specify your link target following Grails conventions, such as this example (using the `controller`, `action` and `id` attributes). `<g:link>` is also smart enough to follow our URL mappings, so if we change the URL mapping for `vehicle/show`, the `<g:link>` tag will still render the correct URL. There's many more attributes supported by `<g:link>` - see the http://docs.grails.org/latest/guide/theWebLayer.html#automaticLinkRewriting[Grails documentation] for more.