In grails how to insert additional parameters (from session) in all url's
- by HeDinges
I would like to add an additional parameter in my url, the use case is the following:
When user do their login they also specify a 'company' name and from that moment on, all urls should map to:
/$company/$controller/$action/$id
The main idea is to have the current company name available in all url's, have it bookmarkable, and not to have to pass the company name everywhere as a request parameter.
Also, once users are logged in it is acceptable to have the chosen company name in session scope.
What is the right way of inserting this parameter in all our urls? I tried to modify my UrlMappings mapping, but I didn't found a way to insert the company name.
Thanks,