function fieldgroup_preprocess_node in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 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 1137 - 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'] : '';
}
}