Hi, I wonder if it's possible placing blocks inside tabs, I've tried with visibility using the form mydirectory/mycontent#mytab and did't work. I have already enabled the Descriptive tab URLs option in Tab module.

Thank's!

Comments

beckyjohnson’s picture

Have you tried the quicktab module? I think that would solve your problem...

kayograco’s picture

I'm working on a academic's website project, and it's important to give permissions to the user so he can edit a specific published content. With QT you have to create multiple nodes and a block, wich holds the nodes, making it hard to edit the content.

With CCK Fieldgroup Tabs, you can edit the content of all tabs in one place.

leahmd’s picture

I've seen posts on embedding blocks inside content, so if you create a field for the block you could in theory then add that field to a group/tab.

I'll be working on this soon, I'll post back if I manage it.

kayograco’s picture

Issue tags: +blocks, +solved, +cck tabs

Worked it out by overriding a cck tabs function:

function THEME_tabpage($element) {
  $output = '';
  $REGIONx = theme('blocks','REGIONx');
  if (!empty($element['#ajax_url']) || !empty($element['#content']) || !empty($element['#children'])) {
    $output .= '<div id="' . $element['#tab_name'] . '" class="tabs-' . $element['#tabset_name'] . '">';
    $output .= '<div id="REGIONx">'.$REGIONx.'</div>';
    $output .= '<h2 class="drupal-tabs-title js-hide">'. $element['#title'] .'</h2>';
    $output .= $element['#content'] . (!empty($element['#children']) ? $element['#children'] : '');
    $output .='</div>';
  }
  return $output;
}

I wonder if there's a better way.

fourmi4x’s picture

I wonder if it would work by choosing PHP mode in the block visibility settings, and make up some php code that :
- adds a condition to validate the content type
- verifies that the path is "node/*/edit#nameofthetab"

For the first part, I think something like

$node = menu_get_object();
if  ( !empty($node)  && $node->type == 'node-type'  )

could work ?