function template_preprocess_fieldgroup_simple in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6 modules/fieldgroup/fieldgroup.module \template_preprocess_fieldgroup_simple()
- 6.2 modules/fieldgroup/fieldgroup.module \template_preprocess_fieldgroup_simple()
Process variables for fieldgroup.tpl.php.
The $variables array contains the following arguments:
- $group_name
- $group_name_css
- $label
- $description
- $content
See also
File
- modules/
fieldgroup/ fieldgroup.module, line 1114 - Create field groups for CCK fields.
Code
function template_preprocess_fieldgroup_simple(&$vars) {
$element = $vars['element'];
$vars['parent'] = isset($element['#parent']) ? $element['#parent'] : NULL;
$vars['group_name'] = $element['#group_name'];
$vars['group_name_css'] = strtr($element['#group_name'], '_', '-');
$vars['label'] = isset($element['#title']) ? $element['#title'] : '';
$vars['description'] = isset($element['#description']) ? $element['#description'] : '';
$vars['content'] = isset($element['#children']) ? $element['#children'] : '';
$vars['template_files'] = array(
'fieldgroup-simple-',
'fieldgroup-simple-' . $element['#group_name'],
'fieldgroup-simple-' . $element['#node']->type,
'fieldgroup-simple-' . $element['#group_name'] . '-' . $element['#node']->type,
);
}