Active
Project:
Display Suite
Version:
7.x-2.16
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jul 2019 at 15:21 UTC
Updated:
23 Jul 2019 at 15:21 UTC
Jump to comment: Most recent
Take a look for example at:
ds/ds.ds_fields_info.inc:49
'default' => array('wrapper' => 'h2', 'link' => 0, 'class' => ''),
If link = 0 then summary wont be displayed for this link setting.
Why? because ds_ds_field_format_summary function doesnt take 0 values into account:
ds/includes/ds.field_ui.inc:1212
function ds_ds_field_format_summary($field) {
$summary = '';
$settings = isset($field['formatter_settings']) ? $field['formatter_settings'] : $field['properties']['default'];
$functions = module_invoke_all('ds_field_theme_functions_info');
foreach ($settings as $key => $value) {
// Ignore Field Formatter conditions.
if ($key == 'conditions') {
continue;
}
if ($key == 'ctools') {
$conf = unserialize($value);
$summary .= t('Type: !type', array('!type' => check_plain(drupal_ucfirst(str_replace('_', ' ', $conf['subtype'])))));
}
elseif ($key == 'ft' || is_array($value)) {
// Do nothing
}
elseif (!empty($value)) {
$value = is_numeric($value) ? ($value ? t('Yes') : t('No')) : check_plain($value);
$summary .= ' ' . str_replace('_', ' ', drupal_ucfirst(check_plain($key))) . ': ' . check_plain($value) . '<br />';
}
}
if (empty($summary) && ($field['field_type'] == DS_FIELD_TYPE_CTOOLS)) {
$summary .= t('Not configured yet.') . '<br />';
}
return $summary;
}
Look at:
elseif (!empty($value)) {
Comments