Commit 1ec4f085 authored by yched's avatar yched

#1008184 followup by dereine: Adapt to Views 3 "semantic views" feature...

#1008184 followup by dereine: Adapt to Views 3 "semantic views" feature (backwards compatible with Views 2)
parent bbecae57
......@@ -145,6 +145,14 @@ class content_handler_field extends views_handler_field_node {
return parent::element_type($none_supported, $default_empty);
}
if ($default_empty) {
return '';
}
if (isset($this->definition['element type'])) {
return $this->definition['element type'];
}
// TODO Figure out exactly when to return a div or a <span>. Any field
// that ever needs to be shown inline in Views UI. It needs to return
// a div for textareas to prevent wrapping a <span> around a <p>.
......
......@@ -204,6 +204,14 @@ class content_handler_field_multiple extends content_handler_field {
return parent::element_type($none_supported, $default_empty);
}
if ($default_empty) {
return '';
}
if (isset($this->definition['element type'])) {
return $this->definition['element type'];
}
return 'div';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment