weight for the tabs ?

4 replies [Last post]
freelylw
Offline
Joined: 10/23/2009
Status: 
Answered

Hello

currently, the affiliate tabs is next to the 'view' tabs in the user account page. Can I set the weight for the tabs then I can move the tabs to other position ? or where I can change the position of the tabs ?

Thanks

Leighton Whiting
Offline
Joined: 06/02/2009
You can change the weight of

You can change the weight of any menu items with a custom module and hook_menu_alter.

Try:

function yourmodule_menu_alter(&$items) {
$items['user/%user/ms_affiliate']['weight'] = 99;
}

Let me know if that works or not :)

-Leighton

freelylw
Offline
Joined: 10/23/2009
sorry, I don't know how to

sorry, I don't know how to coding. if you know any module can do this ? or you can apply this function into the future version.

Leighton Whiting
Offline
Joined: 06/02/2009
Freely, I just looked and

Freely,
I just looked and didn't find any modules that do it, and I am reluctant to add this to my module because if we get too many settings it will start to get cluttered...

I can walk you through making your own module, which is actually much easier than you think.

First, create a new directory called 'mymodule'

In this directory, create two files: mymodule.info, and mymodule.module

This is the mymodule.info file:

name = My Module
description = Tweaks for My Site
package = Administration
core = 6.x

This is the mymodule.module file:
// Start

  1. function mymodule_menu_alter(&$items) {
  2. $items['user/%user/ms_affiliate']['weight'] = 99;
  3. }
  4. //End
  5.  
  6. Save the files, and upload the module to your modules directory, then enable it, and you're good to go!
  7.  
  8. Sincerely,
  9. Leighton Whiting

freelylw
Offline
Joined: 10/23/2009
Thanks for your kind support

Thanks for your kind support !

Twitter Feed