Reply to comment

A cck fieldgroup can be rendered alone. We had some quicktabs we wanted to fill with our field groups. So we've builded a block for each field group to put in the quicktabs. Here is an example of one block where we called a single fieldgroup and rendered it.

First you call all fieldgroups information for a certain content type and then you give the fieldgroup_view_group function the correct fieldgroup definition and your node.

<?php
/**
 * Implementation of hook_block()
 */ 
function glue_block($op 'list'$delta 0$edit = array()) {
  if (
$op == 'list') {
    
$blocks[0] = array(    
      
'info' => t('Company Info'),
    );
    
    return 
$blocks;
  }
  else if (
$op == 'view') {      
    switch(
$delta) {
      case 
0:            
        
$node menu_get_object();
        if (
$node->nid) {
          
$groups fieldgroup_groups('company');
          
          
$node->build_mode 'groupcalls';
          
$content fieldgroup_view_group($groups['group_vennootschapinfo'], $node);
  
          
$block = array(
            
'subject' => t('Company Vennootschaps info'),
            
'content' => $content,
          );   
        }
        break;
    }
    return 
$block;
  }
?>

As an extra if you want to control the fieldgroup field order, but you dont want to mess with the order of your teaser or full node. When using display suite you can make a custom buildmode (for example groupcalls) and in that buildmode you determine the order of your fieldgroups.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><img><p><b><i><table><th><tr><td><blockquote><br /><img /><tbody><span><strike>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <codes>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.