Fix page: take category and tag at the same time
With news and announcement views
This commit is contained in:
1 parent
4127d7f2eb
commit
2d2e01115b
3 files changed
+22
-16
No files matched your search
@@ -64,6 +64,7 @@ class PagesController < ApplicationController
|
||||
module_app = ModuleApp.first(:conditions => {:key => params[:app_name]})
|
||||
if !params[:category_id].blank? && !params[:tag_id].blank?
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => params[:tag_id]})
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id]}) unless @item
|
||||
elsif !params[:category_id].blank?
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id]})
|
||||
elsif !params[:tag_id].blank?
|
||||
|
||||
Reference in new issue
Block a user