Add module position that also shows on tablet/mobile widths

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue May 21, 2013 9:36 pm
Reply with quote
Report this post
Hi - I have added my own login and register module position to gkHeader with this just around line 120:
Code: Select all
                 <?php if($this->API->modules('ajaxmenu')) : ?>
           
            <div id="gkMainMenu">
               <jdoc:include type="modules" name="ajaxmenu" style="<?php echo $this->module_styles['ajaxmenu']; ?>" />
            </div>
            <?php endif; ?>


So the entire header section is now:

Code: Select all
             <header id="gkHeader">
       <div>
          <div class="gkPage" id="gkHeaderNav">                       
             <?php $this->layout->loadBlock('logo'); ?>
            
             <?php if($this->API->get('show_menu', 1)) : ?>
             <div id="gkMainMenu">
                <?php
                   $this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
                    $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
                ?>   
             </div>
             <?php endif; ?>
      
             <?php if($this->API->get('show_menu', 1)) : ?>
            <div id="gkMobileMenu">
                <?php echo JText::_('TPL_GK_LANG_MOBILE_MENU'); ?>
                <select onChange="window.location.href=this.value;">
                <?php
                    $this->mobilemenu->loadMenu($this->API->get('menu_name','mainmenu'));
                    $this->mobilemenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
                ?>
                </select>
                    </div>

             
             <?php  endif; ?>
               
                 <?php if($this->API->modules('ajaxmenu')) : ?>
           
            <div id="gkMainMenu">
               <jdoc:include type="modules" name="ajaxmenu" style="<?php echo $this->module_styles['ajaxmenu']; ?>" />
            </div>
            <?php endif; ?>
             
               
          </div>
       </div>
       
         <?php if($this->API->modules('header')) : ?>
         <div id="gkHeaderMod" class="gkPage">
            <jdoc:include type="modules" name="header" style="<?php echo $this->module_styles['header']; ?>" />
         </div>
         <?php endif; ?>
    </header>



The problem is I that want this module to show at all widths. Currently it works at larger screen widths and not at tablet or mobile widths. Grateful for your help.
User avatar
Fresh Boarder

GK User
Tue May 21, 2013 9:40 pm
Reply with quote
Report this post
Could You post an url to your site?
User avatar
Moderator

GK User
Tue May 21, 2013 9:45 pm
Reply with quote
Report this post
From the quick look at your code...
1. You should never use same ID two times on a page (gkMainMenu).
2. #gkMainMenu is hidded in tablet.css around line 107:
Code: Select all
#gkMainMenu {
   display: none;
}

so it is not visible with browsers width less than 1030px.
User avatar
Moderator


cron