[!!!][BUGFIX] Remove ce-bodytext element if not needed
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid_styled_content / Resources / Private / Templates / Textmedia.html
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