0
I have a somewhat problematic menu. As I have some categories in the menu as the screen decreases it bulges and descends a new menu below.
Then I realized that my bootstrap only collapses on the "Xs" devices. What I need to leave collapsing in the Sm?
My code:
<section id="navbar-top">
<div class="container">
<div class="row">
<div class="col-sm-10 navs-top">
<?php if ($categories) { ?>
<nav id="menu" class="navbar">
<div class="navbar-header"><span id="category" class="visible-xs"><?php echo $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 navbar-nav">
<?php foreach ($categories as $category) { ?>
<?php if ($category['children']) { ?>
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a>
<div class="dropdown-menu">
<div class="dropdown-inner">
<?php foreach (array_chunk($category['children'], ceil(count($category['children']) / $category['column'])) as $children) { ?>
<ul class="list-unstyled">
<?php foreach ($children as $child) { ?>
<li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li>
<?php } ?>
</ul>
<?php } ?>
</div>
<a href="<?php echo $category['href']; ?>" class="see-all"><?php echo $text_all; ?> <?php echo $category['name']; ?></a> </div>
</li>
<?php } else { ?>
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</nav>
<?php } ?>
</div>
<div class="col-sm-2 brands-top">
<button id="button-brands" class="btn-brands"><?php echo $home_brands; ?></button>
<div id="group-brands">
<?php if ($brands) { ?>
<?php foreach ($brands as $brand) { ?>
<h2 id="<?php echo $brand['name']; ?>"><?php echo $brand['name']; ?></h2>
<?php if ($brand['manufacturer']) { ?>
<div class="list-group">
<?php foreach ($brand['manufacturer'] as $manufacturer) { ?>
<div>
<a class="list-group-item" href="<?php echo $manufacturer['href']; ?>"><?php echo $manufacturer['name']; ?></a>
</div>
<?php } ?>
</div>
<?php } ?>
<?php } ?>
<?php } ?>
</div>
</div>
</div>