This patchset optimizes the preview of a form
elements in the page module. The output of the bodytext
field has been removed. Instead, the ctype is shown.
This avoids the useless display of TypoScript in the
preview.
Resolves: #28403
Releases: master, 7.6
Change-Id: I09a18e6b8a782a50a2ea7570b41fe2abc10df835
Reviewed-on: https://review.typo3.org/47082
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
{
if ($row['CType'] === 'mailform') {
- $itemContent = $parentObject->linkEditContent($parentObject->renderText($row['bodytext']), $row) . '<br />';
+ $contentType = $parentObject->CType_labels[$row['CType']];
+ $itemContent = $parentObject->linkEditContent('<strong>' . htmlspecialchars($contentType) . '</strong>', $row) . '<br />';
$drawItem = false;
}
}