I was creating the link with createLink(controller: "doSomething", action: "paramVariableValue")
when it should have been createLink(controller: "doSomething", params:[paramVariable:"paramVariableValue"]
.
Map two levels and a variable to a controller
-
02-06-2022 - |
Question
I want to add the following to UrlMappings.groovy:
"/level1/level2/$paramVariable"(controller:"doSomething", action: "index")
For some reason, this mapping does not actually map the URL to the DoSomethingController. Is there a workaround other than turning level2 into a variable?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow