朋友们大家好,我正在使用 Opencart 3.0.2.0,想要显示第四级类别中的菜单项(我已经能够在 Stackoverflow 上搜索并找到显示到第三级的解决方案)。
您可以在此处查看 .twig 文件:
<div class="hidden-xs">
{% if categories %}
<div class="cateti">
<h3><i class="fa fa-list"></i>category</h3>
</div>
<div class="cate-menu ">
<nav id="menu" class="navbar">
<div class="navbar-header"><span id="category" class="visible-xs">{{ text_category }}</span>
<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav">
{% for category in categories %}
{% if category.children %}
<li class="dropdown"><a href="{{ category.href }}" class="dropdown-toggle header-menu" data-toggle="dropdown">{{ category.name }}<i class="fa fa-angle-down enangle"></i></a>
<div class="dropdown-menu">
<div class="dropdown-inner">
{% for children in category.children|batch(category.children|length / category.column|round(1, 'ceil')) %}
<ul class="list-unstyled">
{% for child in children %}
{% if child.grand_childs %}
<li class="dropdownj02"> <a href="{{ child.href }}" class="dropdown-toggle header-menu" data-toggle="dropdown"> {{ child.name }}<i class="fa fa-angle-down enangle"></i> </a>
<div class="dropdown-menuj02">
<div class="dropdown-inner">
<ul class="list-unstyled grand-child">
{% for grand_child in child.grand_childs %}
<li> <a href="{{ grand_child.href }}"> {{grand_child.name}} </a> </li>
{% endfor %}
</ul>
</div>
</div>
</li>
{% else %}
您可以在文件中看到它们已被修改为显示到第 3 级,现在我想也显示第 4 级。
翻阅古今