[BUGFIX] header element is rendered in lib.stdheader in all HTML5 cases 49/20149/3
authorPatrick Broens <patrick@patrickbroens.nl>
Thu, 25 Apr 2013 10:50:40 +0000 (12:50 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 29 Aug 2013 18:44:58 +0000 (20:44 +0200)
According to the HTML5 specs the header element should be used for
grouping elements. Currently the header element is used if there is any
content in lib.stdheader, for instance a single hx.

This patch fixes this by wrapping lib.stdheader with the header element
only when the date is added to the header. Otherwise it will use the
default div wrapping.

Change-Id: I3e1335e1b1d64962a8488b8177d72eb1126e89dd
Fixes: #47575
Releases: 6.2
Reviewed-on: https://review.typo3.org/20149
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
Reviewed-by: Kai Ole Hartwig
Tested-by: Kai Ole Hartwig
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/css_styled_content/ext_localconf.php
typo3/sysext/css_styled_content/static/setup.txt

index 0d1cf2c..1b9c633 100755 (executable)
@@ -37,6 +37,11 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['compat_version']['tx_c
        'version' => 4004000,
        'description' => '<ul><li>Clear divs will be generated by default for in-text right or left positioned textpic elements.</li><li>The default row space changes to 10px, to be in line with col space and text margin.</li><li>Rendering bugs with wrong margins were fixed (Default CSS changed).</li></ul>'
 );
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['compat_version']['tx_cssstyledcontent_headertag'] = array(
+       'title' => 'CSS Styled Content: &lt;header&gt; tag only when needed',
+       'version' => 6002000,
+       'description' => '<p>lib.stdheader: The &lt;header&gt; tag now only wraps the header if the header element has a date set, else the output is just a straight &lt;hX&gt; tag.</p>',
+);
 // Register ourselves as "content rendering template" (providing the hooks of "static template 43" = content (default) )
 $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'] = array(
        'cssstyledcontent/static/',
index 27fe6cc..35e3dae 100644 (file)
@@ -357,6 +357,9 @@ lib.stdheader {
                        override = <header class="csc-header csc-header-n{cObj:parentRecordNumber}">|</header>
                        override {
                                if {
+                                       isTrue {
+                                               field = date
+                                       }
                                        value = html5
                                        equals.data = TSFE:config|config|doctype
                                }