I know it is not the intention of this module but it would be very cool it there were not only the options: acrivate, deactivate and hide, but also an option rename so a tab name shows another name. And together with http://drupal.org/node/550476 this would be soooo cool - just dreaming ...

CommentFileSizeAuthor
#2 912136-tabtamer-rename-tabs.patch3.03 KBsmoothify

Comments

baff’s picture

The renaming could function like in http://drupal.org/project/tabname_tweaker

smoothify’s picture

Status: Active » Needs work
StatusFileSize
new3.03 KB

Thanks for this module - its really very useful!

I really needed the ability to rename tabs, so here is a patch.

It adds a 'title' textfield element for each menu item which is then saved in the settings.

Then in the menu_alter hook it is retrieved from the settings and replaces the default one.

It doesn't go as far as tabname_tweaker, so no differences per node type and no token integration (yet), however it does of course have control over a much wider range of tabs. I haven't tested but I believe it should co-exist with tabname_tweaker, or if it doesn't it would likely just be a module weight issue.

This patch isn't perfect, and could probably do with a condition to turn this feature on / off, but before spending too much time I wanted to see if it was likely to be considered.

smoothify’s picture

Another thing that should be different in that patch, is that as of now it saves the title of all items even if you didn't change them. Normally this will work fine as it saves the default title, but in the event that a module changes the title we would be stuck with the old one.

There needs to be a toggle variable for whether the title has been changed and only then it should replace it with the saved title. Perhaps some color-coded indication on the form as well showing which ones have been overridden.

glitz’s picture

any way to integrate 912136-tabtamer-rename-tabs.patch into the module so this could be downloaded as one module (without having to dl a patch seperatley)?

thx

coreyp_1’s picture

Status: Needs work » Closed (fixed)

smoothify, thanks for the work. I included this patch with the 1.1 release, as well as made a few changes of my own. Specifically, I made sure that tab names did not disappear when modules were enabled after the administration form was saved, and I took your suggestion to not save the name if it is the same as the default.

baff’s picture

Great ! Very useful - Thanks

glitz’s picture

awesome! will test late today. THANKS!

glitz’s picture

Thanks!

liquidcms’s picture

very cool addition.. works like a charm.. :)

babbage’s picture

Status: Closed (fixed) » Active

Re-opening just to suggest that you add this to the module's description on the module page. This is exactly what I was looking for, but since the module description is quite explicit and does not mention renaming, I initially thought it didn't support this and almost didn't venture into the issue queue to find out more.

Anonymous’s picture

Status: Active » Fixed

Thanks, added to the module description.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.