You are here

function fieldgroup_preprocess_node in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_preprocess_node()

Theme preprocess function for node.

Adds $GROUP_NAME_rendered variables, containing the themed output for the whole group.

File

modules/fieldgroup/fieldgroup.module, line 905
Create field groups for CCK fields.

Code

function fieldgroup_preprocess_node(&$vars) {
  $node = $vars['node'];
  foreach (fieldgroup_groups($node->type) as $group_name => $group) {

    // '#chilren' might not be set if the group is empty.
    $vars[$group_name . '_rendered'] = isset($node->content[$group_name]['#children']) ? $node->content[$group_name]['#children'] : '';
  }
}