URL Mapping prefix in Grails

Posted by Furuno on Stack Overflow See other posts from Stack Overflow or by Furuno
Published on 2010-06-17T04:13:32Z Indexed on 2010/06/17 7:43 UTC
Read the original article Hit count: 234

Filed under:
|

Recently, I'm trying to migrating my application from CakePHP to Grails. So far it's been a smooth sailing, everything I can do with CakePHP, I can do it with much less code in Grails. However, I have one question :

In CakePHP, there's an URL Prefix feature that enables you to give prefix to a certain action url, for example, if I have these actions in my controller :

PostController
admin_add
admin_edit
admin_delete

I can simply access it from the URL :

mysite/admin/post/add
mysite/admin/post/edit/1
mysite/admin/post/delete/2

instead of:

mysite/post/admin_add
mysite/post/admin_edit/1
mysite/post/admin_delete/2

Is there anyway to do this in Grails, or at least alternative of doing this?

© Stack Overflow or respective owner

Related posts about grails

Related posts about url-routing