grailsg:paginate标记和自定义URL

grailsg:paginate标记和自定义URL,grails,url-rewriting,pagination,Grails,Url Rewriting,Pagination,我试图在共享模板中使用g:paginate,其中url的更改取决于控制器,例如 对于我的主页,url应该是:mydomain[DOT]com/news/recent/1..n 搜索页面:www[DOT]mydomain[DOT]com/search/query/ipad apps/filter/this month 我的g:paginate看起来像这样: g:paginate控制器=${customeController}操作=${customAction}总计:${total} 对于第一种情况

我试图在共享模板中使用g:paginate,其中url的更改取决于控制器,例如

对于我的主页,url应该是:mydomain[DOT]com/news/recent/1..n 搜索页面:www[DOT]mydomain[DOT]com/search/query/ipad apps/filter/this month

我的g:paginate看起来像这样:

g:paginate控制器=${customeController}操作=${customAction}总计:${total}

对于第一种情况,我能够将控制器提供为“news”,将操作提供为“recent”,并将url/news/recent/$offset映射到我的控制器

但是对于搜索页面,我无法实现我想要做的事情。我将URL映射定义为/search/$filter**controller:search,action:fetch $filter可以是/query/ipad apps/filter/thismonly/filter/something/filter/somethingelse。 我希望能够显示上述网址,而不是 查询=ipad应用程序&过滤器=本月&过滤器=某物&过滤器=某物

我相信我可以传递g:paginate的params属性中的所有参数,但这不会给我一个漂亮的URL


实现这一目标的最佳方式是什么?如果我遗漏了什么,请随时提问。提前谢谢。

好的。我明白了。希望这对别人有帮助

Set${customAction}=此查询字符串'filter/thismonth/filter/something/filter/somethingelse'与'params'AllAttribute一起传递

谢谢