fix error

This commit is contained in:
邱博亞 2022-10-01 15:16:05 +08:00
parent 0615de7a2a
commit 09a1772f46
3 changed files with 6 additions and 4 deletions

View File

@ -6,9 +6,11 @@ class SiteMenuWidgetsController < ApplicationController
item["obj"] = page
if page.child_page.size > 0
item["page_name"] = page.name
item['dropdown'] = 'dropdown-menu'
item["children"] = create_json(page.sorted_published_child_pages)
else
item["page_name"] = page.name
item['dropdown'] = ''
item["children"] = []
end
if page.page_type == "link"

View File

@ -5,10 +5,10 @@
<ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0">
<li class="sitemenu-item level-1 {{active_class}}">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2 dropdown-menu" data-list="children" data-level="1">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="1">
<li class="sitemenu-item level-2" style="position: relative;">
<a class="sitemenu-link level-2" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2 dropdown-menu" data-list="children" data-level="2">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="2">
<li class="sitemenu-item level-3" style="position: relative;">
<a class="sitemenu-link level-3" href="{{url}}" target="{{target}}">{{page_name}}</a>
</li>

View File

@ -5,10 +5,10 @@
<ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0">
<li class="sitemenu-item level-1 {{active_class}}">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2 dropdown-menu" data-list="children" data-level="1">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="1">
<li class="sitemenu-item level-2" style="position: relative;">
<a class="sitemenu-link level-2" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2 dropdown-menu" data-list="children" data-level="2">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="2">
<li class="sitemenu-item level-3" style="position: relative;">
<a class="sitemenu-link level-3" href="{{url}}" target="{{target}}">{{page_name}}</a>
</li>