7
7
{% set parent = " anomaly.module.settings" %}
8
8
{% endif %}
9
9
10
+
11
+
10
12
{% if not parent %}
11
13
{% for section in template .cp .sections .root ().visible() %}
12
14
{{ menu.sections (template .cp .sections , section ) }}
13
15
{% endfor %}
14
16
15
- {% for navigation in getSubmenus(template .module .namespace ) %}
16
- <li >
17
- <a href =" {{ url(navigation .href ) }}" >
18
- {{ trans(navigation .title ) }}
19
- </a >
20
- </li >
21
- {% endfor %}
17
+ {% set submenus = getSubmenus(template .module .namespace ) %}
18
+
19
+ {% if count(submenus ) %}
20
+ {% for addon in submenus %}
21
+ <li class =" dropdown d-inline-block" >
22
+ <a type =" button" data-toggle =" dropdown" >
23
+ {{ addon .name }}
24
+ <span class =" caret" ></span ></a >
25
+ <ul class =" dropdown-menu ml-0 my-0 py-0"
26
+ style =" position: relative; background-color: transparent !important; border: 0;padding-left: 1.3rem" >
27
+
28
+ {% for navigation in addon .links %}
29
+ <li >
30
+ <a href =" {{ url(navigation .href ) }}"
31
+ style =" font-size: 14px;color: #ccc !important;" >
32
+ {{ trans(navigation .title ) }}
33
+ </a >
34
+ </li >
35
+ {% endfor %}
36
+ </ul >
37
+ </li >
38
+ {% endfor %}
39
+
40
+ {% endif %}
22
41
{% else %}
23
- {% for navigation in getSections(parent ) %}
42
+
43
+ {% set menu = getSections(parent ) %}
44
+ {% set main_menu = menu ['main' ] %}
45
+ {% set sub_menus = menu ['sub_menus' ] %}
46
+
47
+ {% for navigation in main_menu %}
24
48
<li >
25
49
<a href =" {{ url(navigation .href ) }}" >
26
50
{{ trans(navigation .title ) }}
27
51
</a >
28
52
</li >
29
53
{% endfor %}
30
54
55
+ {% if count(sub_menus ) %}
56
+ {% for addon in sub_menus %}
57
+ <li class =" dropdown d-inline-block" >
58
+ <a type =" button" data-toggle =" dropdown" >
59
+ {{ addon .name }}
60
+ <span class =" caret" ></span ></a >
61
+ <ul class =" dropdown-menu ml-0 my-0 py-0"
62
+ style =" position: relative; background-color: transparent !important; border: 0;padding-left: 1.3rem" >
63
+
64
+ {% for navigation in addon .links %}
65
+ <li >
66
+ <a href =" {{ url(navigation .href ) }}"
67
+ style =" font-size: 14px;color: #ccc !important;" >
68
+ {{ trans(navigation .title ) }}
69
+ </a >
70
+ </li >
71
+ {% endfor %}
72
+ </ul >
73
+ </li >
74
+ {% endfor %}
75
+
76
+ {% endif %}
77
+
31
78
{% endif %}
32
79
</ul >
33
80
</aside >
0 commit comments