[!!!][BUGFIX] Remove ce-bodytext element if not needed 68/47368/5
authorJan Fässler <jan@faessler.be>
Wed, 23 Mar 2016 13:54:11 +0000 (14:54 +0100)
committerSusanne Moog <typo3@susannemoog.de>
Wed, 13 Apr 2016 08:04:16 +0000 (10:04 +0200)
The wrapping div is superfluous if neither text nor header is set in
fluid_styled_content

Resolves: #75237
Releases: master
Change-Id: Ic5bba9cef51778311aa17df1c58d9c07ee439b8b
Reviewed-on: https://review.typo3.org/47368
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/core/Documentation/Changelog/master/Breaking-75237-RemovalOfDivCe-bodytextMightCauseLayoutIssues.rst [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Textmedia.html

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-75237-RemovalOfDivCe-bodytextMightCauseLayoutIssues.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-75237-RemovalOfDivCe-bodytextMightCauseLayoutIssues.rst
new file mode 100644 (file)
index 0000000..1589ba3
--- /dev/null
@@ -0,0 +1,28 @@
+=======================================================================
+Breaking: #75237 - Removal of div ce-bodytext might cause layout issues
+=======================================================================
+
+Description
+===========
+
+If neither bodytext nor header were entered in the TextMedia element, the div element containing the class ce-bodytext will be suppressed.
+
+
+Impact
+======
+
+The missing div could cause layout problems, if the layout and CSS depends on it.
+
+
+Affected Installations
+======================
+
+All installations relying on <div class="ce-bodytext">
+
+
+Migration
+=========
+
+Either change the CSS or use a custom template without all the conditions.
+
+.. index:: fluid, ext:fluid_styled_content
index e84930b..8bd102d 100644 (file)
@@ -9,12 +9,25 @@
                        <f:render partial="MediaGallery" arguments="{_all}" />
                </f:if>
 
-               <div class="ce-bodytext">
-                       <f:if condition="{gallery.position.noWrap}">
-                               <f:render partial="Header" arguments="{_all}" />
-                       </f:if>
-                       <f:format.html>{data.bodytext}</f:format.html>
-               </div>
+               <f:if condition="{data.bodytext}">
+                       <f:then>
+                               <div class="ce-bodytext">
+                                       <f:if condition="{gallery.position.noWrap}">
+                                               <f:render partial="Header" arguments="{_all}" />
+                                       </f:if>
+                                       <f:format.html>{data.bodytext}</f:format.html>
+                               </div>
+                       </f:then>
+                       <f:else>
+                               <f:if condition="{gallery.position.noWrap}">
+                                       <f:if condition="{data.header}">
+                                               <div class="ce-bodytext">
+                                                       <f:render partial="Header" arguments="{_all}" />
+                                               </div>
+                                       </f:if>
+                               </f:if>
+                       </f:else>
+               </f:if>
 
                <f:if condition="{gallery.position.vertical} == 'below'">
                        <f:render partial="MediaGallery" arguments="{_all}" />
@@ -23,4 +36,4 @@
 
        <f:render partial="Footer" arguments="{_all}" />
 </div>
-</html>
+</html>
\ No newline at end of file