update navigation

This commit is contained in:
vedatakd 2022-02-09 15:53:55 +03:00
parent 5b0ad6ad9f
commit 84f26441c0
3 changed files with 32 additions and 7 deletions

View File

@ -11,6 +11,7 @@
},
"require": {
"fruitcake/laravel-cors": "^2.0",
"visiosoft/style_selector-module": "*"
"visiosoft/style_selector-module": "*",
"visiosoft/submenu-plugin": "*"
}
}

View File

@ -10,7 +10,7 @@ class CatsModule extends Module
*
* @var bool
*/
protected $navigation = true;
protected $navigation = false;
/**
* The addon icon.
@ -32,4 +32,5 @@ class CatsModule extends Module
]
];
protected $parent = 'visiosoft.module.advs';
}

View File

@ -1,11 +1,34 @@
{% import "visiosoft.theme.defaultadmin::macros/sections.twig" as menu %}
<aside id="menu" class="scrollbar">
<ul>
{% if not template.module.parent %}
{% for section in template.cp.sections.root().visible() %}
{{ menu.sections(template.cp.sections, section) }}
{% endfor %}
</ul>
{% for navigation in getSubmenus(template.module.namespace) %}
<li>
<a href="{{ url(navigation.href) }}">
{{ trans(navigation.title) }}
</a>
</li>
{% endfor %}
{% else %}
{% for navigation in getSections(template.module.parent) %}
<li>
<a href="{{ url(navigation.href) }}">
{{ trans(navigation.title) }}
</a>
</li>
{% endfor %}
{% for navigation in getSections(template.module.namespace) %}
<li>
<a href="{{ url(navigation.href) }}">
{{ trans(navigation.title) }}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</aside>