5

How can I add a new tab to user profile beside View(active tab) and Edit. I want to add for instance New User Tab which will be visible only by administrator (not by the user itself).

I want to add in this tab some informations related to the user and to make some associations with specific nodes related to the user.

6

If this is for Drupal 7, you should take a look at the profile2 module. It allows you to create a profile entity where you can add any fields. It also creates tabs on the user page via permissions.

In general to create tabs, you need to create menu local items. Views 3 support this, and it is also possible to create such a tab with hook_menu by setting the type to MENU_LOCAL_TASK. There are some requirements to the path of the url to make this work, but this is all well documented at the drupal API reference, linked to above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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