Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How do you remove the "Discussions" link in the Menu?
dan39
New
I have a custom theme, and I need to remove the "Discussions" link from the Menu. I know that sounds like something you wouldn't normally want to do, but I plan on having a much bigger link to "Discussions" somewhere else on the page, and having that same link very close to it in the Menu is redundant in my theme.
I see in class.hooks.php there is a bit of code that adds that link:
Deleting that code from class.hooks.php seems like the wrong way to remove that link. I assume there's got to be a way to remove that link directly from default.master.php. Can anyone help me out?
I see in class.hooks.php there is a bit of code that adds that link:
public function Base_Render_Before(&$Sender) {
// Add menu items.
$Session = Gdn::Session();
if ($Sender->Menu) {
$Sender->Menu->AddLink('Discussions', T('Discussions'), '/discussions', FALSE);
}
}
Deleting that code from class.hooks.php seems like the wrong way to remove that link. I assume there's got to be a way to remove that link directly from default.master.php. Can anyone help me out?
0
Comments
$this->Menu->RemoveLinks('Discussions');
...to the Menu statement in default.master.php seemed to do the trick.
good for you...
btw, can you help me on this? --- http://vanillaforums.org/discussion/22234/how-do-i-remove-a-blank-menu-from-tabs