Hello, I'm trying to set up a URL scheme for help documentation in my app: /docs/$controller/$action which would render a view /$controller/$action.docs.gsp
I've been looking at the documentation here: http://grails.org/doc/latest/guide/single.html#6.4.3%20Mapping%20to%20Views and the "Dynamic Controller and Action Names" section under: http://grails.org/doc/latest/guide/single.html#6.4.2%20Embedded%20Variables I can't see why it's not working. I've tried a few variations, but the one I think really should work is: [code] "/docs/$cn/$an?" { controller = { params.cn } view = { if(params.an) { "${params.an}.docs" } else { "docs" } } } [/code] When I try this I get an error: [quote] HTTP Status 404 - /docs_test/WEB-INF/grails-app/views/test/[email protected] [/quote] Which leads me to believe that the closure isn't being evaluated? Any help on this would be greatly appreciated. Thanks. -- Learn from the past. Live in the present. Plan for the future. Blog: http://eric-berry.blogspot.com jEdit <http://www.jedit.org> - Programmer's Text Editor Bazaar <http://bazaar.canonical.com> - Version Control for Humans
