[support] Ajax Tabs in Drupal 6

Fred Jones fredthejonester at gmail.com
Mon Mar 16 19:28:48 UTC 2009


I have a custom module which I must upgrade from D5 to D6. In D5 I
used the tabs module (part of the jstools module) and code like:

  $form['example1']['tab2'] = array(
    '#type' => 'tabpage',
    '#title' => t('Audio'),
    '#url' => base_path().'ajax/nodelist/audio',
    '#target' => 'media_tab',
  );

and it magically makes this tab link load the content via Ajax. OK,
someone else wrote this code, but anyhow it works. I tried to do the
same thing with the D6 tabs module (now not part of jstools) but no
Ajax happens. :(

There is also the magictabs module, but AFAICT that module creates all
the content for all the nodes when the page is called, as opposed to
what I want, which is to only generate the content for each node when
it's requested, via a callback.

I could write some jQuery code to do this myself I suppose, but I was
wondering if there's a module that does this or if I the tabs module
can do this?

Thanks


More information about the support mailing list