How to change Main Menu

Added by Reiner Lichtenberger about 1 year ago

Hi,
is it possible to delete or change top menu bar:
Home
My page
Projects
Administration
Help

I want to remove "Help"
thx
RL

Replies (11)

RE: How to change Main Menu - Added by Mayama Takeshi about 1 year ago

There might be a simpler way but you could use this plugin:
https://www.redmine.org/plugins/redmine_custom_js

Then configure it with this code to remove the menu item:

$(document).ready(function() {
  $(".help").remove()
})

RE: How to change Main Menu - Added by Reiner Lichtenberger about 1 year ago

thx, but does not fit with Version 4.x
other ideas?

RE: How to change Main Menu - Added by Mayama Takeshi about 1 year ago

I'm using 4.1.1.
It works for me:

RE: How to change Main Menu - Added by Reiner Lichtenberger about 1 year ago

thx.
I ll try to remove this in redmine.rb
  1. menu.push :help, Redmine::Info.help_url, :last => true
    is a new start of apache always necessary?
    Thx

RE: How to change Main Menu - Added by Mischa The Evil about 1 year ago

FWIW: I recommend against patching Redmine core files or using JavaScript hacks with additional plugin dependencies for something as small as this.
I suggest you just utilize the designated plugin API for this. A simple plugin would consist of something along the lines of an 'init.rb' file that looks like:

Redmine::Plugin.register :remove_top_menu_help do
  name 'Remove Top Menu Help Item'
  author 'Mischa The Evil'
  description 'A tiny Redmine plugin to remove the top menu help item.'
  version '0.0.1'
  url 'https://www.redmine.org/boards/1/topics/59964'
  author_url 'https://www.redmine.org/users/1565'

  # Remove the help item from the top menu
  delete_menu_item :top_menu, :help
end

Now place that file into a new directory named 'remove_top_menu_help' in your Redmine's 'plugins' directory and restart your Redmine environment. Et voila...

RE: How to change Main Menu - Added by Reiner Lichtenberger about 1 year ago

this:

I ll try to remove this in redmine.rb

menu.push :help, Redmine::Info.help_url, :last => true
is a new start of apache always necessary?
Thx

works out, thx to all

RE: How to change Main Menu - Added by Leo L. 5 months ago

Mischa The Evil wrote:

FWIW: I recommend against patching Redmine core files or using JavaScript hacks with additional plugin dependencies for something as small as this.
I suggest you just utilize the designated plugin API for this. A simple plugin would consist of something along the lines of an 'init.rb' file that looks like:
[...]
Now place that file into a new directory named 'remove_top_menu_help' in your Redmine's 'plugins' directory and restart your Redmine environment. Et voila...

That piece of advice should definitely appears in the official Wiki : smart, simple and useful.
Thanks for that.

RE: How to change Main Menu - Added by Peter Johnson 4 months ago

Reiner Lichtenberger wrote:

thx, but does not fit with Version 4.x
other ideas?

that really works, thank you very much!!!

RE: How to change Main Menu - Added by Bernhard Rohloff 4 months ago

Leo L. wrote:

Mischa The Evil wrote:

[...]
Now place that file into a new directory named 'remove_top_menu_help' in your Redmine's 'plugins' directory and restart your Redmine environment. Et voila...

That piece of advice should definitely appears in the official Wiki : smart, simple and useful.
Thanks for that.

FYI: An article on how to manipulate the menu entries exists and can be found here: Plugin_Tutorial

RE: How to change Main Menu - Added by Martina A. 9 days ago

you can try this plugin:
https://www.redmine.org/plugins/additionals

I used it to remove the "help" menu from Main Menu Bar.
There are also other useful options.

Worked quite well and it is just a tick in configuration and no change in code necessary.

(1-11/11)