Post by pghmediaking » Wed Jan 26, 2022 11:04 pm

Can anyone tell me where an opencart template mobile drop down menu html would be located in the file structure. What file is the html located in? Ive checked header files and everything else I could think of but cant for the life of me find it.

Newbie

Posts

Joined
Fri Jun 09, 2017 8:06 am

Post by Gergely » Wed Jan 26, 2022 11:40 pm

Hi pghmediaking,

Do you mean the Categories menu in mobile view?
Image

That should be in catalog/view/theme/theme name/template/common/header.tpl.

Code: Select all

<?php if ($categories) { ?>
<div class="container">
  <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>
</div>
<?php } ?>
Hope this helps,
Gergely

Attachments

mobile-menu.png

mobile-menu.png (37.64 KiB) Viewed 916 times


Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by pghmediaking » Thu Jan 27, 2022 12:06 am

so if I inspect I need to change .rd-mobilemenu_ul. That is not located in the header file. Nothing of that nature is located in that file. Im trying to assign a style inline because Im having trouble with the server not loading the style sheet. Instead its loading an old stylesheet from somewhere, maybe cached. Localhost is saying its an open cart issue but I know it has something to do with their end. This is a work around Im trying to achieve until I can figure out why the stylesheet that is loaded onto the server is the stylesheet that is being used currently

Newbie

Posts

Joined
Fri Jun 09, 2017 8:06 am
Who is online

Users browsing this forum: Bing [Bot] and 137 guests