fix: [genericElement:singleView] Improved display of json field
parent
41e9666224
commit
aa66b4fbf5
|
@ -3,8 +3,8 @@
|
|||
if (isset($field['raw'])) {
|
||||
$string = $field['raw'];
|
||||
} else {
|
||||
$value = Cake\Utility\Hash::extract($data, $field['path']);
|
||||
$string = count($value) == 0 ? '' : $value[0];
|
||||
$value = Cake\Utility\Hash::get($data, $field['path']);
|
||||
$string = is_null($value) ? '' : $value;
|
||||
}
|
||||
echo sprintf(
|
||||
'<div class="json_container_%s"></div>',
|
||||
|
|
Loading…
Reference in New Issue