Hi all,

How do I get the dynamic tabs like that of http://share.triangle.com/ on my site? Thanks

Comments

journaltimes’s picture

You'll have to hard code it in.

mpare’s picture

I few sprinkles of CSS can dramatically change the way your site looks, and at times with very little effort. This is kinda an old link, but its still relavent and should prove to be very helpful. You might check on google by searching for, css tabbed navigation, to see if any of the techniques have been updated.

Now that will work perfect for you if you don't need your tabs to be a different color for each one. If you do need the varied almost random colored tabs you could sprinkle a little php that would create a dynamic css class name for you.

Note that even with the first method you can still set different colors depending on the status of the link, for things like hover, active, etc...

Well I hope that helps some.

Peace,
-mpare
www.paretech.com

mrbert’s picture

I used this module http://drupal.org/project/jstools to generate dynamic data on mouse click without refreshing.Thanks all

Griffonia | Voacanga Africana Seeds | http://www.voacanga-africana.com.gh/sheabutter/">Shea Butter

dharamgollapudi’s picture

mrbert:

I activated tabs under jstools, but somehow couldn't get the tabs to work. I don't even see any additional settings when creating views or panels that would allow me to play with the tabs. What else do I need to active for tabs to show up.

I would appreciate it if you could provide me some details (steps) on how to achieve what you have achieved similar to that shows at www.share.triangle.com along with any other required modules.

Thanks in advance.

mrbert’s picture

I tried this with views enabled .

Using http://drupal.org/project/insert_view

<?php
    /* ---------------------------------------------------------- */

    $module = 'views';
    $delta = 'calendar';

    $block = (object) module_invoke($module, 'block', 'view', $delta);
    $block->module = $module;
    $block->delta = $delta;

    $tab_A = theme('block', $block);

    /* ---------------------------------------------------------- */

    $module = 'views';
    $delta = 'latest_videos';

    $block = (object) module_invoke($module, 'block', 'view', $delta);
    $block->module = $module;
    $block->delta = $delta;

    $tab_B = theme('block', $block);

    /* ---------------------------------------------------------- */

    $form = array();

    $form['hpTabs'] = array(
        '#type' => 'tabset',
    );

    $form['hpTabs']['tab1'] = array(
        '#type' => 'tabpage',
        '#title' => t('Calendar'),
        '#content' => $tab_A,
    );

    $form['hpTabs']['tab2'] = array(
        '#type' => 'tabpage',
        '#title' => t('Video'),
        '#content' => $tab_B,
    );

    $form['hpTabs']['tab3'] = array(
        '#type' => 'tabpage',
        '#title' => t('Three'),
        '#content' => t('Third tab content.'),
    );

    return tabs_render($form);

    /* ---------------------------------------------------------- */
?>


Griffonia | Voacanga Africana Seeds | http://www.voacanga-africana.com.gh/sheabutter/">Shea Nuts