tag to have it write the URL appropriately. Here is an example...
In UrlMappings.groovy:
name profileMapping: "/profile/show/$alias/$listOd?" {
controller = "profile"
action = "show"
}
In a GSP page:
<g:link mapping="profileMapping" params="${[alias: profile.alias, list: currentList.id]}"/>
This is important, because often the default mapping of /controller/action/id is not the best suited for the task. You might want to specify something more human readable than a numeric ID for usability and SEO, for instance.
Anyway, this is just another reason I really like grails.
No comments:
Post a Comment