Update sub menu list
This commit is contained in:
parent
f9cf40c635
commit
5b7dadaa72
|
@ -6,7 +6,8 @@ class SiteMenuWidgetsController < ApplicationController
|
||||||
if page.parent_page == Page.root
|
if page.parent_page == Page.root
|
||||||
pages = page.sorted_published_child_pages
|
pages = page.sorted_published_child_pages
|
||||||
else
|
else
|
||||||
pages = page.parent_page.sorted_published_child_pages
|
pages = page.sorted_published_child_pages
|
||||||
|
pages = page.parent_page.sorted_published_child_pages if pages.count == 0
|
||||||
end
|
end
|
||||||
def create_json(pages)
|
def create_json(pages)
|
||||||
items = []
|
items = []
|
||||||
|
|
Loading…
Reference in New Issue