Search Box In Main Menu

GK User
Thu Mar 01, 2012 1:55 pm
Hi all, I've just started using this template today - absolutely awesome!!! OMG the work you guys have put into this this is fantastic.

I'm still finding my way around, but I've came up stuck with one thing -

I've gotten rid of the first menu ( nightly news , dateline , morning joe etc....)

So my question is, how can I put the search box on the MAIN menu (Home , Template , Modules Menu etc..)

Can't figure this out, any help would be gratefully appreciated

BrianD
User avatar
Fresh Boarder

GK User
Thu Mar 01, 2012 2:59 pm
Hi Brian,

Thanks for being interested in our template.

My solution is to move position search into main menu block, please do as below:

- Open file: \templates\gk_twn2\layouts\default.php

- Find:
Code: Select all
<?php if($this->modules('search')) : ?>
                 <div id="gkSearch">
                    <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
                 </div>
                 <?php endif; ?>   

Move it to after:
Code: Select all
<?php
                  $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
                   $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
               ?>

Please try and let me know if it helps.
User avatar
Platinum Boarder

GK User
Thu Mar 01, 2012 3:40 pm
Hi, thanks for the quick reply.

I tried the code you suggested, but the search box didn't show up on the mainmenu - although the topmenu1/search box above reappeared!

I'd be grateful for any other thoughts....

brian d
User avatar
Fresh Boarder

GK User
Fri Mar 02, 2012 12:36 pm
Can you send me a PM to provide me with backend and FTP access info then I can take a look and try more for you?

Thanks,
User avatar
Platinum Boarder

GK User
Mon Jun 25, 2012 4:56 pm
Hey Don

I am after the same thing. Did you come up with an answer to this?

I already had it moved, but couldn't get it to show. The only difference is that I also moved the search Param into this block as well and out of the top menu block.

Code: Select all
<?php if($this->getParam('show_menu or search', 1)) : ?>
             <div id="gkMainMenu" class="clear">
               <?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="<?php echo $this->module_styles['search']; ?>" />
                 </div>
                 <?php endif; ?>   
             </div>
             <?php endif; ?>>
User avatar
Fresh Boarder

GK User
Tue Jun 26, 2012 2:36 am
Nevermind I figured it out.

Code: Select all
<?php if($this->getParam('show_menu or search', 1)) : ?>
             <div id="gkMainMenu" class="clear">
                <?php if($this->modules('search')) : ?>
                 <div id="gkSearch">
                    <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
                 </div>
                 <?php endif; ?><?php
                  $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
                   $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
               ?>
                  
             </div>
             <?php endif; ?>
User avatar
Fresh Boarder

GK User
Tue Jun 26, 2012 10:31 am
Glad to know that, don't hesitate to ask for any further help.

Cheers,
User avatar
Platinum Boarder


cron