How to change Main Menu
Added by Reiner Lichtenberger about 4 years 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 (16)
RE: How to change Main Menu - Added by Mayama Takeshi about 4 years 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 4 years ago
thx, but does not fit with Version 4.x
other ideas?
RE: How to change Main Menu - Added by Mayama Takeshi about 4 years ago
I'm using 4.1.1.
It works for me:
RedmineNoHelp.png (105 KB) RedmineNoHelp.png |
RE: How to change Main Menu - Added by Reiner Lichtenberger about 4 years ago
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
RE: How to change Main Menu - Added by Mischa The Evil about 4 years 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 4 years 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. over 3 years 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 over 3 years 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 over 3 years 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. about 3 years 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.
RE: How to change Main Menu - Added by Nion Marvin about 3 years ago
Hello I'll try to remove for my web xloo "Help" in redmine.rb
- menu.push :help, Redmine::Info.help_url, :last => true
Thanks it really works!! And really simple.
RE: How to change Main Menu - Added by Jenda Benda about 2 months ago
Hi Guys,
this looks great, thank you.
Could you please help me to create this simple plugin to add link ty https://new-link-aaa.com to the top menu?
Thank you so much
Kind regards
J.
RE: How to change Main Menu - Added by Bernhard Rohloff about 1 month ago
It's basically the same as what Mischa suggested earlier in the thread but instead of removing an entry you have to add one.
Mischa The Evil wrote in RE: How to change Main Menu:
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...
Here is an example...
Redmine::Plugin.register :jenda do
name 'Jendas cool plugin'
author 'Jenda Benda'
description 'Adds a link to https://new-link-aaa.com to the top menu.'
version '0.0.1'
url 'https://www.redmine.org/boards/1/topics/59964'
author_url 'https://www.redmine.org/users/137847'
# Add the link with the text Jenda to the top menu
menu :top_menu, "Jenda", "https://new-link-aaa.com"
end
Its registered under the name :jenda
so you have to place it in an init.rb file under the subfolder jenda in your redmines plugins directory. After restarting the instance your link shows up.
RE: How to change Main Menu - Added by Jenda Benda about 1 month ago
Thank you so much! It works like a charm-)