How to put search module in main menu bar

GK User
Wed Jun 15, 2011 4:45 am
I would like my search mod to be on the end of the main menu bar :)
User avatar
Junior Boarder

Konrad M
Wed Jun 15, 2011 5:28 am
Hi
You need to go to templatesgk_musicitylayoutsblocks and edit nav.php file.
In this file you need to find this part:
Code: Select all
<?php if($this->modules('info + search')) : ?>
<div id="gkNavBottom" class="clear">
   <?php if($this->modules('info')) : ?>
   <div id="gkInfo">
      <jdoc:include type="modules" name="info" style="none" />
   </div>
   <?php endif; ?>
   
   <?php if($this->modules('search')) : ?>
   <div id="gkSearch">
      <jdoc:include type="modules" name="search" style="none" />
   </div>
   <?php endif; ?>
</div>
<?php endif; ?>


and cut from this part this one:
Code: Select all
   <?php if($this->modules('search')) : ?>
   <div id="gkSearch">
      <jdoc:include type="modules" name="search" style="none" />
   </div>
   <?php endif; ?>


and paste it here (in the same file):
Code: Select all
<div id="gkMenu">
      <?php
         $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
          $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
      ?>
// paste it here
User avatar

GK User
Wed Jun 15, 2011 1:56 pm
I did like you said but it opens a secend empty bar under the main menu and search ...
here's how my code look like in nav.php

Code: Select all
<div id="gkMainNav" class="gkWrap">
   <div id="gkMenu">
      <?php
         $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
          $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
      ?>
   
   <?php if($this->modules('search')) : ?>
   <div id="gkSearch">
      <jdoc:include type="modules" name="search" style="none" />
   </div>
   <?php endif; ?>
   
      <?php if($this->generateSubmenu && $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1), true)): ?>
      <div id="gkSubmenu" class="clear">
            <?php $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1));?>
      </div>
      <?php endif;?>
   </div>
</div>

<?php if($this->modules('info + search')) : ?>
<div id="gkNavBottom" class="clear">
   <?php if($this->modules('info')) : ?>
   <div id="gkInfo">
      <jdoc:include type="modules" name="info" style="none" />
   </div>
   <?php endif; ?>
   
</div>
<?php endif; ?>



and the search module position is search
User avatar
Junior Boarder

GK User
Thu Jun 16, 2011 12:51 am
I got it all i did is i remove + search from this line
Code: Select all
<?php if($this->modules('info + search')) : ?>
and now my code look like this
Code: Select all
<?php if($this->modules('info')) : ?>
i'm not sure this is the right way to do it but its working .. :laugh:
User avatar
Junior Boarder


cron