<?php if ($categories) { ?>
<div class="container">
<a class="toggleMenu" href="#">Menu</a>
<ul class="nav_menu">
<?php foreach ($categories as $category) { ?>
<li><?php if ($category['children']) { ?><div class="parent"<?php } ?>
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php if ($category['children']) { ?>
<?php for ($i = 0; $i < count($category['children']);) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li>
<a href="<?php echo $category['children'][$i]['href']; ?>">
<?php echo $category['children'][$i]['name']; ?></a>
</li>
<?php } ?>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>
</li>
<?php } ?>
</ul>
<div>
<?php } ?>
<?php if ($categories) { ?>
<div class="container">
<a class="toggleMenu" href="#">Menu</a>
<ul class="nav_menu">
<?php foreach ($categories as $category) { ?>
<li>
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php if ($category['children']) { ?>
<?php for ($i = 0; $i < count($category['children']); $i++) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li>
<a href="<?php echo $category['children'][$i]['href']; ?>">
<?php echo $category['children'][$i]['name']; ?></a>
</li>
<?php } ?>
<?php } //for i < $j ?>
<?php } //for ($i = 0; $i < count ?>
</ul>
<?php } // if ($category['children']) #8 ?>
</li>
<?php } // foreach ($categories as $category) ?>
</ul>
<div>
<?php } ?>
<?php if ($categories) { ?>
<div class="container">
<a class="toggleMenu" href="#">Menu</a>
<ul class="nav_menu">
<?php foreach ($categories as $category) { ?>
<li><?php if ($category['children']) { ?><?php } ?>
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php if ($category['children']) { ?>
<?php for ($i = 0; $i < count($category['children']);) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li>
<a href="<?php echo $category['children'][$i]['href']; ?>">
<?php echo $category['children'][$i]['name']; ?></a>
</li>
<?php } ?>
<?php } //for i < $j ?>
<?php } //for ($i = 0; $i < count ?>
</ul>
<?php } // if ($category['children']) #8 ?>
</li>
<?php } // foreach ($categories as $category) ?>
</ul>
<div>
<?php } ?>