user583977
user583977

Reputation: 1

display a content type in a tab next to the profile tab

I have created a drupal content type called 'My Notes' and I want to display it in a tab right next to the profile tab. I have created a field called 'subject' which displays in the 'My Notes' content type. once I click on 'create My Notes content' and fill in the details , I want this to be displayed in a tab.

please provide me step wise explanation.

Upvotes: 0

Views: 1073

Answers (3)

danish
danish

Reputation: 1

use the content profile module. Then you will see the option to add that content type as a tab next to the profile tab. But i think that it will also be visible during the time of registeration. I aint sure about that.

Upvotes: -2

Andrew Sledge
Andrew Sledge

Reputation: 10351

Use Views to create a view of the profile, add a Page type display, and within that Page display you can add a menu tab for that page. This is a alternative to writing any code, plus Views will allow you to theme the page a little more easily.

Upvotes: 3

charan
charan

Reputation: 186

Write custom module and use hook_menu_alter() to change the tabs or add a new one. here some code from one of my custom modules

/**
* Implementation of hook_menu_alter(). 
* Remember to clear the menu cache after adding/editing this function.
*/
    function profile_customizations_menu_alter(&$items) {

        // Changing tab names and weights
        $items['user/%user_uid_optional']['weight'] = -10;

        $items['user/%user_category/edit']['title'] = 'Account settings';
        $items['user/%user_category/edit']['weight'] = -9;

        $items['user/%user/profile/individual']['title'] = 'Edit profile';
        $items['user/%user/profile/individual']['weight'] = -8;

        $items['user/%user/profile/ngo']['title'] = 'Edit profile';
        $items['user/%user/profile/ngo']['weight'] = -8;

        $items['user/%user/delete']['title'] = 'Delete account';
        $items['user/%user/delete']['weight'] = 10;

        $items['user/%user/profile']['title'] = 'Profile';
        $items['user/%user/profile']['weight'] = -9;

    /*        $items[] = array( // Change the My account link to display My Profile and drop to bottom of list
                             'path' => 'use/' . $user->uid,
                             'title' => t('My Profile'),
                             'callback' => 'user_view',
                             'callback arguments' => array(arg(1)),
                             'access' => TRUE,
    //                         'type' => MENU_DYNAMIC_ITEM,
                 'type' => MENU_NORMAL_ITEM,
                             'weight' => 9
                        );*/

    //    $items['user/%user/profile/individual']['title'] = 'My Profile';
    /*  $items[] = array(
                'path' => 'user/' . $user->uid . '/profile',
                'title' => t('Profile'),
                'callback' => 'user_view',*/
    }

Upvotes: 0

Related Questions