You are here

function theme_ds_field in Display Suite 6.3

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

Theme function to render the field content.

Parameters

array $field Collection of field properties.:

2 theme calls to theme_ds_field()
views_plugin_ds_fields_view::ds_views_fields_render in views/views_plugin_ds_fields_view.inc
Render the content for modules not implementing the ds api.
_nd_nodeapi in modules/nd/nd.module
Helper function to alter node properties

File

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

Code

function theme_ds_field($field) {
  $output = '';
  if (!empty($field['content'])) {
    $output .= '<div class="field ' . $field['class'] . '">';

    // Above label.
    if ($field['labelformat'] == 'above') {
      $output .= '<div class="field-label">' . $field['title'] . ': </div>';
    }

    // Inline label
    if ($field['labelformat'] == 'inline') {
      $output .= '<div class="field-label-inline-first">' . $field['title'] . ': </div>';
    }
    $output .= $field['content'];
    $output .= '</div>';
  }
  return $output;
}