You are here

function theme_ds_field_minimal in Display Suite 7.2

Same name and namespace in other branches
  1. 7 modules/ds_extras/ds_extras.module \theme_ds_field_minimal()

Provide minimal HTML for the field.

File

modules/ds_extras/ds_extras.module, line 753
Display Suite extras main functions.

Code

function theme_ds_field_minimal($variables) {
  $output = '';
  $config = $variables['ds-config'];
  $classes = isset($config['classes']) ? ' ' . $config['classes'] : '';

  // Add a simple wrapper.
  $output .= '<div class="field field-name-' . strtr($variables['element']['#field_name'], '_', '-') . $classes . '">';

  // Render the label.
  if (!$variables['label_hidden']) {
    $output .= '<div class="label-' . $variables['element']['#label_display'] . '">' . $variables['label'];
    if (!isset($config['lb-col'])) {
      $output .= ':&nbsp;';
    }
    $output .= '</div>';
  }

  // Render the items.
  foreach ($variables['items'] as $delta => $item) {
    $output .= drupal_render($item);
  }
  $output .= "</div>";
  return $output;
}