Project

General

Profile

Actions

Bug #48049

closed

CSC-Styled-Content "Hidden" Header with HTML5 is rendered as <h100>

Added by Gabriel Kaufmann / Typoworx NewMedia over 11 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2013-05-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I'm using TYPO3 4.7.10 with HTML5-Mode (doctype=html5).

I noticed that Headers configured as "hidden"-Type (Type 100) are rendered as h100-Tag.

Furthermore there seems to be some conflict in CSC-Styled-Content Typoscript, as the non-html5 Headers seem to have a correct condition:

This looks fine:

lib.stdheader {
  # Defined in: "EXT:css_styled_content/static/", 395
  stdWrap {
    fieldRequired = header

   # Post-processing:
   if {
     equals.field = header_layout
     value = 100
     negate = 1
   }
}

But it seems to conflict somehow with this?

lib.stdheader {
  # HTML5 subheader, Defined in: "EXT:css_styled_content/static/", 308
  20 = CASE
  20 {
    # HTML5 Header Overrides
    # [...]

    if.isTrue {
      value = html5
      equals.data = TSFE:config|config|doctype
    }
  }
}

Each condition for its own look fine at first glance, but the second one for HTML5 seems to miss an additional check for the hidden-header of type "100" as defined in "EXT:css_styled_content/static/", Line 395.

Can anyone confirm this?

Actions #1

Updated by Philipp Gampe over 11 years ago

  • Status changed from New to Needs Feedback

What CSS styled content version are you including?

This is how it looks for me (4.7):

699:     # HTML5 <hgroup> open
700:     7 = TEXT
701:     7 {
702:         value = <hgroup>
703:         fieldRequired = subheader
704:         if {
705:             value = html5
706:             equals.data = TSFE:config|config|doctype
707:         }
708:     }
709: 
710:     # This CASE cObject renders the header content:
711:     # currentValue is set to the header data, possibly wrapped in link-tags.
712:     10 = CASE
713:     10.setCurrent {
714:         field = header
715:         htmlSpecialChars = 1
716:         typolink.parameter.field = header_link
717:     }
718:     10.key.field = header_layout
719:     10.key.ifEmpty = {$content.defaultHeaderType}
720:     10.key.ifEmpty.override.data = register: defaultHeaderType
721: 
722:     10.1 = TEXT
723:     10.1.current = 1
724:     10.1.dataWrap = <h1{register:headerClass}>|</h1>
725: 
726:     10.2 < .10.1
727:     10.2.dataWrap = <h2{register:headerClass}>|</h2>
728: 
729:     10.3 < .10.1
730:     10.3.dataWrap = <h3{register:headerClass}>|</h3>
731: 
732:     10.4 < .10.1
733:     10.4.dataWrap = <h4{register:headerClass}>|</h4>
734: 
735:     10.5 < .10.1
736:     10.5.dataWrap = <h5{register:headerClass}>|</h5>
737: 
738:     # HTML5 subheader
739:     20 = CASE
740:     20 {
741:         key {
742:             field = header_layout
743:         }
744: 
745:         default = TEXT
746:         default {
747:             wrap = <h2>|</h2>
748:             htmlSpecialChars = 1
749:             field = subheader
750:         }
751: 
752:         1 < .default
753: 
754:         2 < .default
755:         2.wrap = <h3>|</h3>
756: 
757:         3 < .default
758:         3.wrap = <h4>|</h4>
759: 
760:         4 < .default
761:         4.wrap = <h5>|</h5>
762: 
763:         5 < .default
764:         5.wrap = <h6>|</h6>
765: 
766:         if {
767:             isTrue {
768:                 field = subheader
769:             }
770:             value = html5
771:             equals.data = TSFE:config|config|doctype
772:         }
773:     }
774: 
775:     # HTML5 <hgroup> close
776:     30 < lib.stdheader.7
777:     30 {
778:         value = </hgroup>
779:     }

and
825:     # Post-processing:
826:     stdWrap.fieldRequired = header
827:     stdWrap.if {
828:         equals.field = header_layout
829:         value = 100
830:         negate = 1
831:     }

Actions #2

Updated by Jigal van Hemert about 11 years ago

  • Status changed from Needs Feedback to Closed

Closed, no feedback received for more than 90 days.

Actions #3

Updated by Oliver Hader about 7 years ago

  • Category changed from 1050 to Frontend
Actions

Also available in: Atom PDF