返回结果页面?

问题描述:

这是我的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和点击它进入 /locale/italy/tuscany/villas/villa-x(别墅-X具有多页),他们是在“托斯卡纳环境”。

现在我想制作一个按钮“回到搜索结果”,然后回到最初的/listing页面。我怎样才能做到这一点? :back不是一个选项,因为别墅有多个页面。

您可以使用此缓存。因为缓存对象也可以在控制器和视图中使用。

您应该从视图中设置缓存对象中的URL,并将在该特定链接上从控制器重定向。