You are here

function theme_ds_multigroup_list in Display Suite 6.3

Same name and namespace in other branches
  1. 6.2 theme/theme.inc \theme_ds_multigroup_list()

Theme a multigroup list.

Parameters

string $group The group to theme.:

1 string reference to 'theme_ds_multigroup_list'
_ds_theme in includes/ds.registry.inc
Return theme functions.

File

theme/theme.inc, line 402
Theming functions for ds.

Code

function theme_ds_multigroup_list($group) {
  $variation = array_pop(explode('_', $group['theme']));
  switch ($variation) {
    case 'ol':
      $type = 'ol';
      break;
    case 'ul':
    default:
      $type = 'ul';
      break;
  }
  $items = array();
  foreach ($group['rows'] as $row) {
    if (!empty($row['rendered'])) {
      $items[] = $row['rendered'];
    }
  }
  $attr['class'] .= $row['class'];
  return count($items) ? theme('item_list', $items, NULL, $type, $attr) : '';
}