Revert "Page front end stay in the same page when a link is clicked (category)"
This reverts commit 14d856b4d6
.
This commit is contained in:
parent
14d856b4d6
commit
9cf8c2b72b
|
@ -64,11 +64,9 @@ class PagesController < ApplicationController
|
|||
protected
|
||||
|
||||
def get_item
|
||||
if !params[:page_id].blank?
|
||||
if params[:page_id]
|
||||
@item = Item.find(params[:page_id])
|
||||
elsif !params[:orig_page].blank?
|
||||
@item = Item.find(params[:orig_page])
|
||||
elsif !params[:same_page_id].blank?
|
||||
elsif params[:same_page_id]
|
||||
@item = Item.find(params[:same_page_id])
|
||||
else
|
||||
category_ids = params[:category_id].is_a?(Array) ? params[:category_id] : [params[:category_id]]
|
||||
|
@ -82,6 +80,7 @@ class PagesController < ApplicationController
|
|||
elsif !tag_ids.blank?
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action], :tag.in => tag_ids).any_in(category: [nil, []]).first
|
||||
end
|
||||
@item = Item.find(params[:orig_page]) unless @item || params[:orig_page].blank?
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).all_of("tag" => {"$in" => [nil, []]},"category" => { "$in" => [nil, []]}).first unless @item
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: 'default_widget').first unless @item
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).first unless @item
|
||||
|
|
Loading…
Reference in New Issue