O'Reilly logo

OpenCart Theme and Module Development by Rupak Nepali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Describing the code of the top menu categories

We'll describe the categories that show the menu's code, and then we will change the style of the menu. Go to catalog/view/theme/packttheme/template/common/, open header.tpl in your favourite editor, and find <?php if ($categories) { ?>. We are going to describe the code that shows up in the category menu:

<?php if ($categories) { ?>
<div class="container">
  <nav id="menu" class="navbar">

The preceding code checks whether there is a category or not:

 <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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required