Hello all,
I need help creating a bootstrap menu dropdown for this template.
So far i edited my tpl_header.php file and added the following code:
<div style="text-align:center;"class="dropdown">
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Shop</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Tablet</a>
<a class="dropdown-item" href="#">Smartphone</a>
</div>
</div>
so far so as it is populating dropdown menu , however,, i am trying to achieve the following where:
Shop (dropdown menu that would display active category)
-> category 1
->category 2
->category 3....
I was using mega menu on my previous template and was hoping to achieve the same using bootstrap.
Mega-menu uses the following code if it helps:
<li class="categories-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop"><?php echo HEADER_TITLE_CATEGORIES; ?></a><!-- bof cateories -->
<div class="dropdown_1column">
<div class="col_1 firstcolumn">
<div class="levels">
<?php
// load the UL-generator class and produce the menu list dynamically from there
require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
$zen_CategoriesUL = new zen_categories_ul_generator;
$menulist = $zen_CategoriesUL->buildTree(true);
$menulist = str_replace('"level4"','"level5"',$menulist);
$menulist = str_replace('"level3"','"level4"',$menulist);
$menulist = str_replace('"level2"','"level3"',$menulist);
$menulist = str_replace('"level1"','"level2"',$menulist);
$menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
$menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
echo $menulist;
?>
</div>
</div>
</div>
</li><!-- eof categories -->
I would like a drop down menu that would display all my categories if possible and makes sense.
Additionally, how can hide these dropdown menu on mobile and tablet. I want these menu only on desktop.