joomla3.0 - Joomla 3.0 on Gantry - bootstrap - duplicating the mainmenu for phone -


i working on new template using gantry base , need build menu in way handle mobile phone. problem having way modified default.php file in mod_menu in order duplicate menu mobile setup dups other menus in site ie. footer menu.

is there way can build out main menu mobile friendly without messing footer menu?

here link working example dealing with. notice footer menu acts same way mainmenu whe scale down phone size.

http://www.mniac.com/spymaniac30/

<nav class="main <?php echo $class_sfx; ?>"<?php $tag = ''; if ($params->get('tag_id') != null) {     $tag = $params->get('tag_id') . '';     echo ' id="' . $tag . '"'; } ?> role="navigation"> <ul>         <?php if ($class_sfx === 'nav-list') : ?>         <li></li>         <li class="nav-header"><?php echo $module->title; ?></li>     <?php endif; ?>     <?php      $previous_parent = null;     foreach ($list $i => &$item) :         $class = '';         if ($item->id == $active_id)         {             $class .= 'current ';         }          if ($item->type == 'alias' &&                 in_array($item->params->get('aliasoptions'), $path)                 || in_array($item->id, $path))         {             $class .= 'active ';         }         if ($item->deeper)         {             $class .= 'deeper ';         }          if ($item->parent)         {             $class .= 'parent dropdown ';             $previous_parent = $item->id;             $item->flink = "#";         }          if (!empty($class))         {             $class = ' class="' . trim($class) . '"';         }          echo '<li id="item-' . $item->id . '"' . $class . '>';          // render menu item.         switch ($item->type) :             case 'separator':             case 'url':             case 'component':                 require jmodulehelper::getlayoutpath('mod_menu', 'default_' . $item->type);                 break;              default:                 require jmodulehelper::getlayoutpath('mod_menu', 'default_url');                 break;         endswitch;          // next item deeper.         if ($item->deeper)         {             echo '<ul class="jb-nav dropdown-menu" role="menu" aria-labelledby="drop' . $previous_parent . '">';         }         // next item shallower.         else if ($item->shallower)         {             echo '</li>';             echo str_repeat('</ul></li>', $item->level_diff);         }         // next item on same level.         else         {             echo '</li>';         }     endforeach;     ?>     </ul> </nav>  <nav class="mobile <?php echo $class_sfx; ?>"<?php $tag = ''; if ($params->get('tag_id') != null) {     $tag = $params->get('tag_id') . '';     echo ' id="' . $tag . '"'; } ?> role="navigation"> <div id="menu-link"><a href="#">menu</a></div> <ul style="display:none;">         <?php if ($class_sfx === 'nav-list') : ?>         <li></li>         <li class="nav-header"><?php echo $module->title; ?></li>     <?php endif; ?>     <?php      $previous_parent = null;     foreach ($list $i => &$item) :         $class = '';         if ($item->id == $active_id)         {             $class .= 'current ';         }          if ($item->type == 'alias' &&                 in_array($item->params->get('aliasoptions'), $path)                 || in_array($item->id, $path))         {             $class .= 'active ';         }         if ($item->deeper)         {             $class .= 'deeper ';         }          if ($item->parent)         {             $class .= 'parent dropdown ';             $previous_parent = $item->id;             $item->flink = "#";         }          if (!empty($class))         {             $class = ' class="' . trim($class) . '"';         }          echo '<li id="item-' . $item->id . '"' . $class . '>';          // render menu item.         switch ($item->type) :             case 'separator':             case 'url':             case 'component':                 require jmodulehelper::getlayoutpath('mod_menu', 'default_' . $item->type);                 break;              default:                 require jmodulehelper::getlayoutpath('mod_menu', 'default_url');                 break;         endswitch;          // next item deeper.         if ($item->deeper)         {             echo '<ul class="jb-nav dropdown-menu" role="menu" aria-labelledby="drop' . $previous_parent . '">';         }         // next item shallower.         else if ($item->shallower)         {             echo '</li>';             echo str_repeat('</ul></li>', $item->level_diff);         }         // next item on same level.         else         {             echo '</li>';         }     endforeach;     ?>     </ul> </nav> 

thanks all

you dont have edit core files, aviod if can, obvious reasons ^^

just add menu module in "mobile position" should hidden if screen width on x , shown if below.

or since bootstrapped already: 1 module topmenu , 1 module footer

so end duplicating modules in module manager instead of changing code...

simple that


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -