3rd party menu module on mainmenu position

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
Wed Jun 19, 2013 11:57 pm
Reply with quote
Report this post
Hi there,

What is the easiest way to use a 3rd party menu module instead of template main menu?

Thanks and Regards,
Arthur
User avatar
Fresh Boarder

GK User
Thu Jun 20, 2013 3:50 am
Reply with quote
Report this post
If you want to display it where current menu is then you need to change that to a module position where you can display your new menu module.

Firstly turn off Gavick Menu in template settings > menu.

Then make below modifications in templates/gk_storebox/layout/default.php

Lines: 82 to 103 which is below.
Code: Select all
                <?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 $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; ?>

Replace with below
Code: Select all
                <?php if($this->API->modules('mobilemenu')) : ?>
                <div id="gkMobileMenu">
                  <jdoc:include type="modules" name="mobilemenu" style="none" />
                </div>
                <?php endif; ?>
             
                <?php $this->layout->loadBlock('logo'); ?>
               
                <?php if($this->API->modules('sitemenu')) : ?>
                <div id="gkMainMenu">
                  <jdoc:include type="modules" name="sitemenu" style="none" />
                </div>
                <?php endif; ?>
             </div>


This gives you following module positions.
Code: Select all
mobilemenu
sitemenu

As template files does not contain these positions so they will not be listed when selecting module positions so simply write it yourself in module settings > module positions in the text box manually.

Also I have left div ids in there so it doesn't change logo allignments. You can change css if you are required or change the div id name if you need to.

See you around...
User avatar
Platinum Boarder

GK User
Sun Jun 23, 2013 4:57 pm
Reply with quote
Report this post
Thank you,

I sent you pm with link my my site.
There is a litle problem with two divs "gkBottom1" and "gkFooter" after below changes.

There isn't an error but they are displayed in a different way now.

I'll appreciate your further help,

Thanks again!
User avatar
Fresh Boarder

GK User
Sun Jun 23, 2013 9:11 pm
Reply with quote
Report this post
As I stated in pm you have a extra div tag so your problem is caused because of this, please send the details and I ll check your file as I need to see where the extra tag is.

See you around...
User avatar
Platinum Boarder


cron