to hide top menu only on home page

GK User
Fri Jun 08, 2012 10:20 am
Hi, friends!
Can you tell, how to hide top gk menu only on home page?
User avatar
Junior Boarder

GK User
Fri Jun 08, 2012 12:34 pm
Hi

Try something like this:

Open ../templates/gk_myfolio/layouts/default.php

find this code:
Code: Select all
<?php if($this->getParam('show_menu', 1)) : ?>

              <div id="gkMainMenu">
                 <?php
                    $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
                     $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
                 ?>
              </div>
                <?php endif; ?>

replace with:

Code: Select all
<?php if($this->getParam('show_menu', 1)) : ?>
               <?php if($this->isFrontpage()) : ?>
               <div class="hide_gkmenu"></div>
               <?php endif; ?>
              <div id="gkMainMenu">
                 <?php
                    $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
                     $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
                 ?>
              </div>
                <?php endif; ?>



Them go to template parameters and enable override.css file.
Next add this line on this file, located on css template directory:

Code: Select all
.hide_gkmenu + #gkMainMenu {display: none}


Cheers
User avatar
Platinum Boarder


cron