Hide Main Menu on selected pages

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 05, 2013 2:51 am
Reply with quote
Report this post
I created a new k2 category and I want to hide the main menu on those pages. I noticed that the main menu is generated from the template settings and you can either turn it on or off (no settings for individual pages - like a module).

I tried turning the menu off in the template settings and created a main menu module, but I couldn't get the newly created module to show up in the same positon as the template generated module (in the demo that module position is called "main menu", but there is no "main menu" option when selection postions for modules).

So, is there a way for me to hide the main menu (whether template generated or from a new module) on certain pages?
User avatar
Fresh Boarder

GK User
Wed Jun 05, 2013 7:30 am
Reply with quote
Report this post
There is no easy fox for that.
I would advice to create new module position, and place it in place of current menu callout (/templates/gk_startup/layouts/default.php):
Code: Select all
<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>

And then use this newly created module to publish menu on pages where it should be.
User avatar
Moderator


cron