I have a problem. I am not sure that this is the correct section to post it in but I will give it a go and please let me know if I should move it.
I hope that I am explaining myself correctly .... I am currently using the B&W template with Joomla 2.5 ( latest ).
My site requires different menu structures on different sections of the site ( kind of a sub site thing )
So, on URL www.mysite.com I need the main menu. On a specific article (or category) for example (www.mysite.com/locations), I need to show a different different menu structure.
My problem is with the template, the display of the menu is generated.controled through the template management interface, rather than through a module position ( As I have seen with other/older template and menus ).
I have tried creating multiple menus, adding a template position, and wrapping the GK Extra menu code in nav.php with conditional mod code:
- Code: Select all
<?php if( $this->modules('nav')) : ?>
<?php if($this->getParam('show_menu', 1)) : ?>
<div id="gkMainNav">
<div id="gkMenu">
<?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="gkSubNav">
<div id="gkSubmenu">
<?php $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1));?>
</div> </div>
<?php endif;?>
</div>
<?php endif;?>
<?php endif; ?>
This allows me to turn it on and off with module positioning but obviously because code that generates the menu uses parameters from the template ( including the menu name ) it always generates the same menu selected through the template management section.
Is there a way that I can use GK Extra Menu like a standard menu module so that I can assign it to a position and assign a specific menu through the menu manager? Or is there another better way to achieve what I need and have different main menus on different pages ( preferably without duplicating the template and assigning different templates to different sections. )
Any thoughts or help would be appreciated.
Regards
Michael Tull