Skip to content

Commit 7abc429

Browse files
committed
update
1 parent 09c7d24 commit 7abc429

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@
2525
"psr-4": {
2626
"Visiosoft\\DefaultadminTheme\\": "src/"
2727
}
28+
},
29+
"require": {
30+
"visiosoft/submenu-plugin": "*"
2831
}
2932
}

resources/views/partials/menu.twig

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,34 @@
33
<aside id="menu" class="scrollbar">
44

55
<ul>
6-
{% for section in template.cp.sections.root().visible() %}
7-
{{ menu.sections(template.cp.sections, section) }}
8-
{% endfor %}
6+
{% if not template.module.parent %}
7+
{% for section in template.cp.sections.root().visible() %}
8+
{{ menu.sections(template.cp.sections, section) }}
9+
{% endfor %}
10+
11+
{% for navigation in getSubmenus(template.module.namespace) %}
12+
<li>
13+
<a href="{{ url(navigation.href) }}">
14+
{{ trans(navigation.title) }}
15+
</a>
16+
</li>
17+
{% endfor %}
18+
{% else %}
19+
{% for navigation in getSections(template.module.parent) %}
20+
<li>
21+
<a href="{{ url(navigation.href) }}">
22+
{{ trans(navigation.title) }}
23+
</a>
24+
</li>
25+
{% endfor %}
26+
{% for navigation in getSections(template.module.namespace) %}
27+
<li>
28+
<a href="{{ url(navigation.href) }}">
29+
{{ trans(navigation.title) }}
30+
</a>
31+
</li>
32+
{% endfor %}
33+
{% endif %}
934
</ul>
1035

1136
</aside>

0 commit comments

Comments
 (0)