BEWARE: INCREDIBLY SIMPLE
These steps work for:
Drupal 6
Drupal 7
The Need
We had a client request come in that required for us to add a new tab to the user profile for a new page.
The Problem
How in the world of Drupal are you supposed to add a tab? Use hook_menu_alter? No. Custom Module? No. Add it to a menu somewhere? No. (I mean, if you feel like spending more time than necessary you could do the first perhaps.)
The Solution
VIEWS! I told you it would be incredibly simple.
Step 1:
Create your new view.
Step 2:
Add a display: Page
Step 3: (Important Step)
Under “Page Settings” for “Path” you will need to set the path for the page under the parent page.
For Example:
If you want to add a Tab to all of the User profiles on your website, set your path as “user/%/yourtab”. (% will become the uid of the profile being viewed)
Step 4:
Also under “Page Settings” is “Menu”, set this to “Menu Tab” or “Default Menu Tab”. From there you will set your Tab’s title, description and it’s parent item.
Step Done:
That’s it, you’re finished! Now you may run free and set up your one of a kind, mastermind view!
In Picture Book Format
Simple indeed, but so useful!