From 157935e7ebfe3378a7ccec080839d9652fd9f610 Mon Sep 17 00:00:00 2001 From: chris Date: Mon, 18 Mar 2013 21:54:06 +0800 Subject: [PATCH] Page front end stay in the same page when a link is clicked (title or pagination) --- app/controllers/pages_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index ef9e3e77f..e9dd1b7b0 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -64,7 +64,9 @@ class PagesController < ApplicationController protected def get_item - if params[:same_page_id] + if params[:page_id] + @item = Item.find(params[:page_id]) + elsif params[:same_page_id] @item = Item.find(params[:same_page_id]) else module_app = ModuleApp.first(:conditions => {:key => params[:app_name]})