fix widget title
This commit is contained in:
parent
3100742e40
commit
1a1b79cc15
|
@ -8,6 +8,13 @@ class SiteMenuWidgetsController < ApplicationController
|
|||
else
|
||||
pages = page.parent_page.sorted_published_child_pages
|
||||
end
|
||||
|
||||
page.page_parts.collect do |pp|
|
||||
pp.sub_parts.collect do |sp|
|
||||
@title = sp.title if sp.module == "site_menu_widget"
|
||||
end
|
||||
end
|
||||
|
||||
def create_json(pages)
|
||||
items = []
|
||||
pages.each do |page|
|
||||
|
@ -41,10 +48,12 @@ class SiteMenuWidgetsController < ApplicationController
|
|||
end
|
||||
items
|
||||
end
|
||||
|
||||
|
||||
items = create_json(pages)
|
||||
{
|
||||
"pages" => items,
|
||||
"extras" => {"widget_title" => "Sub Menu"}
|
||||
"extras" => {"widget_title" => @title}
|
||||
}
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue