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

Nicole shizu__ at hotmail.com
Sun Jul 11 21:53:00 CEST 2010


Hi Oliver!

Okay, ähm...
When I choose "layout h1" my headline should look like 
"<h1>headline</h1>". It's "<h1>headline</h1>" - fine.
"layout h2" makes my code look like "<h1>headline</h1>". I want to have 
it this way: "<h2>headline</h2>"
In "layout h3" it's the same: I want to get "<h3>headline</h3>" and the 
code shows "<h2>headline</h2>"

The csc-firstHeader has to be enabled in every layout.

Hm. I don't have many skills in TypoScript. I copied most of it. ^^" But 
always one of the layouts must have been chosen!

Did you get it?

Nicole


Am 11.07.2010 14:41, schrieb Oliver Rowlands:
> Hi Nicole,
>
> Could you explain what you mean by "aren't wrapped well"? What output do
> you get on the front-end?
>
>  From what I can tell your TypoScript looks fine, though why are you
> starting your lib.stdheader.10 at 0 rather than overriding the default 1?
>
> Best regards,
>
> Oliver
>
> Nicole wrote:
>> 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