Changes in bulletins widget and front-end, add categories to link

This commit is contained in:
Christophe Vilayphiou committed 2012-02-28 04:24:09 +08:00
1 parent 81bb3120ca
commit 7f9a7edc98
6 files changed
+9 -8

No files matched your search

+5 -1
View File
@@ -45,7 +45,11 @@ class PagesController < ApplicationController
def get_item
module_app = ModuleApp.first(:conditions => {:key => params[:app_name]})
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action]})
if params[:category_id]
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id]})
else
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action]})
end
end
end