你应该设置url在缓存对象从视图,将重定向从控制器上的特定链接。
这是我的url结构:(登陆页)
/locale/villas/
Listing of all the villas with url's pointing to the country and region. Examples:
/locale/italy/tuscany/villas/villa-r
/locale/italy/tuscany/villas/villa-t
/locale/italy/umbria/villas/villa-u
/locale/spain/andalusia/villas/villa-a
etc...
/locale/country/villas/
Listing of the villas in the specified country with url's pointing to the country and region. Examples:
/locale/italy/tuscany/villas/villa-x
/locale/italy/tuscany/villas/villa-y
/locale/italy/umbria/villas/villa-z
etc...
/locale/country/region/villas/
Listing of the villas in the specified country and region with url's pointing to the country and region. Examples:
/locale/italy/tuscany/villas/villa-x
/locale/italy/tuscany/villas/villa-y
/locale/italy/umbria/villas/villa-z
etc...
当访问者访问登陆页面/locale/villas
并点击a别墅时,它就去了/locale/italy/tuscany/villas/villa-x
(villa-x有多个页面),它们处于"托斯卡纳环境"中。
现在我想做一个按钮"回到搜索结果",所以他们回到最初的/listing
页面。我该怎么做呢?:back
不是一个选项,因为别墅有多个页面。
可以使用缓存。因为缓存对象在控制器和视图上都是可用的。