Hello,

I would like to insert a simple link to tabset-2 in my tabset-1.
I just add

go to BBB

in tabset-1 but it doesn't work.

<div id="tabs-1" class="drupal-tabs">
<ul class="anchors" >
<li ><a href="#tabs-tabset-1">AAA</a></li>
<li ><a href="#tabs-tabset-2">BBB</a></li>
<li ><a href="#tabs-tabset-3">CCC</a></li>
</ul> 

<div id="tabs-tabset-1" class="fragment">
<h2 class="drupal-tabs-title">AAA</h2>
<p><a href="#tabs-tabset-2">go to BBB</a></p>
</div>

<div id="tabs-tabset-2" class="fragment">
<h2 class="drupal-tabs-title">BBB</h2>
</div>

<div id="tabs-tabset-3" class="fragment">
<h2 class="drupal-tabs-title">CCC</h2>
</div>

Any idea?

Thanks :)

Comments

nedjo’s picture

Did you see the configuration option to have navigation buttons between one tab and the next? Does this meet your need?

junro’s picture

Sure, but I don't really want to use navigation button.

I just want a simple link I could add where I want. Like a real Link, just to go to another table. Not neccessary the Next or Previous tab :)

junro’s picture

Title: Add Link to #tabs-tabset-2 in #tabs-tabset-1 » Add Link to #tabs-tabset-x in #tabs-tabset-1

I'm using it with contemplate.

I just want to insert href="#tabs-tabset-2" into my "#tabs-tabset-1".

Nobody?

adpo’s picture

subscribe

stanb’s picture

Sorry I can't help with your specific issue but I'm just wondering how you got Tabs (jQuery UI tabs) to work with Contemplate. I have tried but tabs are not being displayed in my nodes. I've posted to the forum:

http://drupal.org/node/773546

but have yet to receive a reply. Just thought you might be able to help as I seem to be missing a critical step or understanding.

Are you also using CCK Fieldgroup Tabs?

Thanks.

junro’s picture

I can use Tabs (jQuery UI tabs) with Contemplate ONLY if I set a group with tabs style. If you don't, Tabs will not work (the code below will not work).

I'm using this code:

<div id="tabs-1" class="drupal-tabs">
<ul class="anchors" >
<li ><a href="#tabs-tabset-1">tab1</a></li>
<li ><a href="#tabs-tabset-2">tab2</a></li>
<li ><a href="#tabs-tabset-3">tab3</a></li>
</ul> 

<div id="tabs-tabset-1" class="fragment">
<h2 class="drupal-tabs-title">tab1</h2>
</div>

<div id="tabs-tabset-2" class="fragment">
<h2 class="drupal-tabs-title">tab2</h2>
</div>

...
stanb’s picture

Is this a conflict between Tabs and Contemplate? I tried turning off my Zeb sub-theme and no difference. I tried disabling Contemplate and no luck. I still cannot get Tabs to display with only CCK Fieldgroup Tabs and Tabs (jQuery UI tabs) enabled. It should work with just these two modules enabled right?

It appears that you are creating the Tabs via CSS. What then is the point of the modules?

junro’s picture

You HAVE to use at least one cck fieldgroup tabs in order to load jquery for your content type. I don't know if it should work that way but it works.

Your really have to check "Tabs" in the fieldgroup settings of a field (that's mean you have to to create at lest one fieldgroup).

Too bad there is no documentation how using jquery tabs with contemplate.

stanb’s picture

Yes, I agree, it is too bad there is no documentation about using Tabs with Contemplate. It seems like it could be a powerful combination if it could be made to work. As I said above, I tried disabling Contemplate so that I had only Tabs and CCK Fieldgroup Tabs enabled. I had already created my fieldgroups and I configured my fieldgroups to display tabs. I also added fields (with the same name as my fieldgroups) and configured them to display tabs as well.

One thing I don't understand from the CCK Fieldgroup Tabs (http://drupal.org/project/cck_fieldgroup_tabs) page is:

Create one or more fieldgroups for a content type and assign fields to the fieldgroup or use existing fieldgroups.

What does it mean

assign fields to the fieldgroup

? How do you assign a field to a fieldgroup?

Thanks.

junro’s picture

1. Create a fieldgroup
2. Create 2 cck fields (or vice-versa)
3. Use Drag and drop button: just slide the fields into the fieldgroup like you did with menu and children items....
4. Fieldgroup settings: Style: Tabs

Very simple :)

stanb’s picture

Yes, very simple...like Columbus and the egg...once you know how. Thank you! I now see tabs in my node edit page AND in my node page, however, ONLY if I disable Contemplate, sooooooooo, I believe that there IS either a conflict between the Contemplate and Tabs (jQuery UI tabs) modules OR Contemplate does not support Tabs. Is this a conflict/issue that the module creators should be aware of?

junro’s picture

It's working with contemplate. Try my code at #6.

ice5nake’s picture

I created this example which uses variables created by the cck fieldgroup tabs module. I moved away from contemplate and just created a node-type.tpl.php file, but this should work in contemplate.

  $form = array();
  $field = array('field_mission','field_vision');
  $form['example1'] = array(
    '#type' => 'tabset',
  );
  foreach ($field as $count => $name) {
    $form['example1']['tab' . $count] = array(
	    '#type' => 'tabpage',
	    '#title' => t($node->content['fieldgroup_tabs']['group_about'][$name]['field']['#title']),
	    '#content' => t($node->content['fieldgroup_tabs']['group_about'][$name]['#children']),
    );
  }

  print tabs_render($form);