function theme_ds_multigroup_div in Display Suite 6.2
Same name and namespace in other branches
- 6.3 theme/theme.inc \theme_ds_multigroup_div()
Theme a multigroup as a collection of simple objects
Parameters
string $group: The multigroup to theme.
1 string reference to 'theme_ds_multigroup_div'
- _ds_theme in includes/
ds.registry.inc - Return theme functions.
File
- theme/
theme.inc, line 211 - Theming functions for ds.
Code
function theme_ds_multigroup_div($group) {
$output = '';
foreach ($group['rows'] as $row) {
$row_output = '';
// Set a legend if a field title exists
$output .= '<div class="' . $row['class'] . '">';
if (!empty($row['title'])) {
$row_output = theme('ds_subgroup_label', $row['title']);
}
foreach ($row['fields'] as $field) {
$class = !empty($field['class']) ? ' ' . $field['class'] : '';
$row_output .= '<div class="field field-item ' . $field['key'] . $class . '">';
// Above label.
if ($field['labelformat'] == 'above') {
$row_output .= '<div class="field-label">' . $field['title'] . ': </div>';
}
elseif ($field['labelformat'] == 'inline') {
$row_output .= '<div class="field-label-inline-first">' . $field['title'] . ': </div>';
}
$row_output .= $field['view'] . '</div>';
}
$output .= $row_output;
$output .= '</div>';
}
return $output;
}