[TYPO3-english] headline: layout and csc-firstHeader

Nicole shizu__ at hotmail.com
Sun Jul 11 14:25:00 CEST 2010


Hello there!

I want to use different layouts for headlines of elements. I need 4 
different layouts: h1, h2, h3, hidden. Plus the csc-firstHeader-class 
has to be enabled.

At the moment I am able to select these layouts, but the h-tag aren't 
wrapped well:
Layout h1 = h1 (+ csc-firstHeader)
Layout h2 = h1
Layout h3 = h2
Layout hidden = hidden

How can I make it work?

TS Config:
lib.stdheader.10.0.fontTag = <h1 {register:headerClass}>|</h1>
lib.stdheader.10.1.fontTag = <h2 {register:headerClass}>|</h2>
lib.stdheader.10.2.fontTag = <h3 {register:headerClass}>|</h3>
TCEFORM.tt_content.header_layout {
		removeItems = 3, 4, 5
		altLabels.0 = Normal
		altLabels.1 = Überschrift 2
		altLabels.2 = Überschrift 3
		disableNoMatchingValueElement = 1
		setup.defaults = 0
}

typo3/sysext/css_styled_content/static/setup.txt
# Content header:
lib.stdheader = COA
lib.stdheader {

	# Create align style-attribute for <Hx> tags
	2 = LOAD_REGISTER
	2.headerStyle.field = header_position
	2.headerStyle.required = 1
	2.headerStyle.noTrimWrap = | style="text-align:|;"|

	# Create class="csc-firstHeader" attribute for <Hx> tags
	3 = LOAD_REGISTER
	3.headerClass = csc-firstHeader
	3.headerClass.if.value=1
	3.headerClass.if.equals.data = cObj:parentRecordNumber
	3.headerClass.noTrimWrap = | class="|"|

	# Date format:
	5 = TEXT
	5.field = date
	5.if.isTrue.field = date
	5.strftime = %x
	5.wrap = <p class="csc-header-date">|</p>
	5.prefixComment = 2 | Header date:

	# This CASE cObject renders the header content:
	# currentValue is set to the header data, possibly wrapped in link-tags.
	10 = CASE
	10.setCurrent {
		field = header
		htmlSpecialChars = 1
		typolink.parameter.field = header_link
	}
	10.key.field = header_layout
	10.key.ifEmpty = {$content.defaultHeaderType}
	10.key.ifEmpty.override.data = register: defaultHeaderType
	
	10.1 = TEXT
	10.1.current = 1
	10.1.insertData = 1
	10.1.fontTag = <h1{register:headerStyle}{register:headerClass}>|</h1>

	10.2 < .10.1
	10.2.fontTag = <h2{register:headerStyle}{register:headerClass}>|</h2>

	10.3 < .10.1
	10.3.fontTag = <h3{register:headerStyle}{register:headerClass}>|</h3>
[... and so on]}


Can somebody help me? :)

Thanks a lot!

Nicole


More information about the TYPO3-english mailing list