Need to disable Main Menu and replace with Mega Menu Module

GK User
Fri Feb 17, 2012 5:16 pm
:D I am back as I have renewed my subscription for another 4 months...

I need to disable the main menu in this template to replace with a Mega Menu Module. I followed this tutorial in your WIKI and it didn't work...
[url]
https://www.gavick.com/documentation/jo ... -position/[/url]


Please advise what I did wrong and how I can get this working please... the site right now is on a local install with WAMPSERVER...

I named the module position in template details: " mega ".

Thanks
Trey
User avatar
Expert Boarder

GK User
Fri Feb 17, 2012 6:08 pm
Can you tell us in which file did you add your code to load new position in. Thank you.

See you around...
User avatar
Platinum Boarder

GK User
Fri Feb 17, 2012 6:15 pm
Hey Norman I editted the following files:

1. Template Details.XML
<position>mega</position>

2. Layouts folder > Default.php

<?php if($this->modules(‘mega’)) : ?>
<div>
<jdoc:include type=”modules” name=”mega” style=”<?php echo $this->module_styles['mega']; ?>” />
</div>
<?php endif; ?>



3. LIB Folder > Framework > gk.const.php
'mega' => 'none',

Thanks
Trey
User avatar
Expert Boarder

GK User
Fri Feb 17, 2012 6:18 pm
Can you please check you have created a new module type "mega menu" and published it in position "mega". Thank you.

See you around...
User avatar
Platinum Boarder

GK User
Fri Feb 17, 2012 6:21 pm
Yes I have done that.
User avatar
Expert Boarder

GK User
Fri Feb 17, 2012 6:27 pm
If the module is enabled as well then i cant see anything wrong for it to not to work. Can you post part of the code where you have inserted in defaults.php file or you can just give line numbers and i can check it out in my server. Thank you.

See you around...
User avatar
Platinum Boarder

GK User
Fri Feb 17, 2012 6:31 pm
I posted this code ...

<div id="gkMainMenu">

<?php if($this->modules(‘mega’)) : ?>
<div>
<jdoc:include type=”modules” name=”mega” style=”<?php echo $this->module_styles['mega']; ?>” />
</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 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; ?>
User avatar
Expert Boarder

GK User
Fri Feb 17, 2012 6:41 pm
is mega menu available non-commercial so i can test this and let you know as it is difficult without seeing what is going on in the code.

See you around...
User avatar
Platinum Boarder

GK User
Fri Feb 17, 2012 6:51 pm
Ill be more than happy to send you the module... it is by www.smartaddons.com

I have a sneaky suspicion I am not doing something right on my end. Send me your email address and I will email the zipped module to you...

Shouldn't I remove the reference to the main menu in the gk.const.php file? is there anything else you can think of.

Here is the module in action on another one of my site's at the very top of the page.... http://www.govenom.com where I am using Sporter.

Also I had asked earlier in an email and had not gotten a response hence the need to substitute the menu for the mega module... is the Mega Menu available in this template.

Trey
User avatar
Expert Boarder

GK User
Fri Feb 17, 2012 6:54 pm
I can't see anything wrong so best thing is to check it out locally rather then giving you wrong information and wasting your time.

My email is normanuk [at] live.co.uk.

See you around...
User avatar
Platinum Boarder

GK User
Fri Feb 17, 2012 7:03 pm
Email sent to you...Thanks

Also I had asked earlier in an email and had not gotten a response hence the need to substitute the main menu for the mega module... is the Mega Menu available in this template.

Trey
User avatar
Expert Boarder

GK User
Fri Feb 17, 2012 7:12 pm
As far as i believe Gavick uses "GK Menu Extended". I have replied back to your email.

See you around...
User avatar
Platinum Boarder

GK User
Fri Feb 17, 2012 7:27 pm
Does that mean that mega menu is available for this template...Trey
User avatar
Expert Boarder

GK User
Fri Feb 17, 2012 11:44 pm
I have managed to install same way please check following check list to make sure you have done all steps.

Screenshot
Code: Select all
http://i41.tinypic.com/9s3tdi.jpg


1. Install Module

2. Install Plugin

3. Add module position into templateDetails.xml file
I have added <position>mega</position>

4. Add module position into "\templates\gk_game_magazine\lib\framework\gk.const.php"
I have added 'mega' => 'none',

5. Add Php code in "\templates\gk_game_magazine\layouts\default.php"
Final code - I removed main menu to make the code neater.
Code: Select all
          <div id="mainContent" class="clear">
              <?php if( $this->modules('mega')) : ?>
             <div>
                <jdoc:include type="modules" name="mega" style="<?php echo $this->module_styles['mega']; ?>" />
             </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; ?>
             
             <?php if( $this->modules('header')) : ?>
             <div id="gkHeader" class="clear clearfix">
                <jdoc:include type="modules" name="header" style="<?php echo $this->module_styles['header']; ?>" />
             </div>
             <?php endif; ?>
             
             <?php $this->messages('message-position-2'); ?>
             
             <?php $this->loadBlock('top'); ?>
             
             <?php $this->loadBlock('main'); ?>
             
             <?php $this->loadBlock('user'); ?>
          </div>


6. Enable Module Mega Menu and Edit below settings.
7. Set Mega Menu module to show in all pages in Menu assignments.
8. Set Position to "mega".
9. Save & Close & Refresh frontend.
10. Works.
11. Tested with j1.7 & j2.5
12. Few css conflicts with slideshow, good luck
User avatar
Platinum Boarder


cron