|
|
@@ -1608,17 +1608,30 @@ class TCEMainHook
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ $data = [];
|
|
|
foreach($cleaned as $k => $val) {
|
|
|
- foreach($val as $field) {
|
|
|
- if(empty($field)) unset($cleaned[$k]);
|
|
|
+ foreach($val as $field => $value) {
|
|
|
+ if(isset($value) && !empty($value)) {
|
|
|
+ $data[$k][$field] = $value;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- foreach($cleaned as $key => $value) {
|
|
|
+ foreach($data as $key => $value) {
|
|
|
$box = $this->createContentElement("boxwrapper");
|
|
|
- $box["subElements"] = array_merge($box["subElements"], $this->checkText($value['headline'], $dbReference, $processedData, "h3"));
|
|
|
- $box["subElements"] = array_merge($box["subElements"], $this->checkText($value['text'], $dbReference, $processedData, "typo3_paragraph"));
|
|
|
- $box["subElements"] = array_merge($box["subElements"], $this->checkText($value['url'], $dbReference, $processedData, "link"));
|
|
|
+ if(isset($value['headline']) && !empty($value['headline'])) {
|
|
|
+ $box["subElements"] = array_merge($box["subElements"], $this->checkText($value['headline'], $dbReference, $processedData, "h3"));
|
|
|
+ }
|
|
|
+ if(isset($value['text']) && !empty($value['text'])) {
|
|
|
+ $box["subElements"] = array_merge($box["subElements"], $this->checkText($value['text'], $dbReference, $processedData, "typo3_paragraph"));
|
|
|
+ }
|
|
|
+ if(isset($value['url']) && !empty($value['url'])) {
|
|
|
+ $box["subElements"] = array_merge($box["subElements"], $this->checkText($value['url'], $dbReference, $processedData, "link"));
|
|
|
+ }
|
|
|
$elements[] = $box;
|
|
|
}
|
|
|
|