2

I'd like to create a tab like the one show in the screenshot for a simple contact address list.

enter image description here

or see this drupal site HERE

I have "contact one," "contact two," and "contact three."
I want to put some text under each contact section.

How can I achieve this?

4

I think you want to use QuickTabs. I am using it on my website (check near the bottom). It seems to be exactly what you want to do. Under each quick tab, you can display nodes, views, blocks or other quick tabs.

  • Thank you!!! that is what i'm looking. i'm not sure i know how to put the tab like you did under putting on node. when i set the tab block on content place i see the tab all over the page but i want to put the tab only under contact node. bay the way have a nice page :) – jone May 10 '11 at 9:45
  • I'm not sure what you want to do. Can you show me your site? – Matthew Hui May 10 '11 at 18:00
  • Thank you i have created a nice contact tab using quicktabs. Thank you! – jone May 11 '11 at 12:31
0

You could use an implementation of hook_menu(). Here's an example in code:

function services_menu() {
  $items['services'] = array(
    'title' => 'Services',
    'description' => 'Description of services',
    'access callback' => TRUE,
    'page callback' => 'services_page_callback',
  );
  $items['services/development'] = array(
    'title' => 'Drupal Development',
    'access callback' => TRUE,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['services/design'] = array(
    'title' => 'Design',
    'page callback' => 'design_tab_callback',
    'access callback' => TRUE,
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
  );
  $items['services/seo'] = array(
    'title' => 'SEO',
    'page callback' => 'seo_tab_callback',
    'access callback' => TRUE,
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,  
  );
  $items['services/hosting'] = array(
    'title' => 'Hosting',
    'page callback' => 'hosting_tab_callback',
    'access callback' => TRUE,
    'type' => MENU_LOCAL_TASK,
    'weight' => 30,
  );
  $items['services/support'] = array(
    'title' => 'Support',
    'page callback' => 'support_tab_callback',
    'access callback' => TRUE,
    'type' => MENU_LOCAL_TASK,
    'weight' => 40,
  );

  return $items;
}

for more info see the documentation for hook_menu().

  • @starsinmypockets Thank you! i have know idea about PHP. and studying drupal API? I think it takes long time. I'm not lazy :) but don't want to wast much time time :) could you tell me what to do. where should i put that code? or some easy clue for beginner. Thanks – jone May 9 '11 at 13:11

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.