From 230ac4cd3fac08fc9bd0053381f1f0d368fc7026 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 30 Jun 2014 15:08:29 +0800 Subject: [PATCH] fixed to sub menu level only --- app/controllers/site_menu_widgets_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/site_menu_widgets_controller.rb b/app/controllers/site_menu_widgets_controller.rb index e137db1..718a8f7 100644 --- a/app/controllers/site_menu_widgets_controller.rb +++ b/app/controllers/site_menu_widgets_controller.rb @@ -1,7 +1,9 @@ class SiteMenuWidgetsController < ApplicationController def widget - pages = Page.root.child_pages_enabled_for_sitemap + params = OrbitHelper.params + page = Page.where(:page_id => params[:page_id]).first + pages = page.sorted_published_child_pages def create_json(pages) items = [] pages.each do |page|