0

I'm using a theme called Nexus.

Now in the login page, /?q=user, it looks somewhat like this: enter image description here

All I want to do is change the order of the tabs, where "Log in" is in front, number one, then Request new password, then lastly Create new account.

Aka: [Log in][Request new password][Create new account]

I've tried looking in the theme's folder, including page.tpl.php, and in the user module files to see if I could find where it was defined/rendered but I couldn't find anything. This also did not seem to be what I wanted.

Sorry for being such a noob.

0

1 Answer 1

1

You may use hook_menu_alter function to do it

/**
 * Implements hook_menu_alter.
 */
 function MYMODULE_menu_alter(&$items) {
   $items['user/login']['weight'] = 0;
   $items['user/password']['weight'] = 1;
   $items['user/register']['weight'] = 2;
 }
5
  • In sites/all/themes/Nexus/nexus/template.php, nexus_menu_alter(&$items) this is already defined ... in the same order. How come it does not render the same way?
    – ZN13
    Jul 8, 2015 at 8:15
  • have you cleared caches?
    – Andrew
    Jul 8, 2015 at 8:18
  • Tried clearing caches, tried changing weights and clearing cache again.
    – ZN13
    Jul 8, 2015 at 8:19
  • Sorry I've made mistake in code, now it should work
    – Andrew
    Jul 8, 2015 at 8:26
  • That's weird though, it was defined with '#weight' in the existing theme code, removing the '#' did nothing.. Cleared my caches too.
    – ZN13
    Jul 8, 2015 at 8:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.