Main menu position is using GK Menu and it is hard coded in files.
If you want to edit the code following is what you need.
Find file: /templates/gk_simplicity/layouts/default.php
Find Lines: 57 to 76 which is responsible for main menu as well as mobile menu.
- Code: Select all
<?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; ?>
<?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; ?>
You can delete above and replace with your module or leave them as it is and add your new position just after it such as below. In below example I have used "mynewmenu" as position name.
- Code: Select all
<?php if($this->API->modules('mynewmenu')) : ?>
<div id="gkMainMenu">
<jdoc:include type="modules" name="mynewmenu" style="<?php echo $this->module_styles['mynewmenu']; ?>" />
</div>
<?php endif; ?>
Now above will catch any module positions using "mynewmenu" as position. Now you need to show this position to be selectable from module settings page. Alternatively you can just type the module position manually in module settings page.
Find file: /templates/gk_simplicity/templateDetails.xml
Find Line: 76 & 77 which is below.
- Code: Select all
<!-- Template specific Module Positions -->
<position>breadcrumb</position>
Add your new position after it.
- Code: Select all
<!-- Template specific Module Positions -->
<position>breadcrumb</position>
<position>mynewmenu</position>
<position>header</position>
Now new position should be selectable in module settings page.
You might need to adjust css style to suit your needs depending on which menu you are using as my example is using default gkMainMenu div css styling. Change its name or add your own css.
- Code: Select all
<div id="gkMainMenu">
</div>
If you haven't deleted original menu codes then please disable Main Menu in
Template settings > Options > Menu > Show template menu " Disabled".
See you around...