[TYPO3] Wrap certain content-elements with a DIV

Martin Rud typo3 at explizit.dk
Fri Mar 17 14:22:44 CET 2006


Hi, tapio

Thx for your tip; I found this solution by looking in setup.txt:

tt_content.stdWrap {
     dataWrap = <div class="CType{field:CType} 
header_layout{field:header_layout}"> <a name="{field:uid}"></a>  
CType{field:CType} headerlayout{field:header_layout} | </div>
}

Now I can change the headetype of a content-element and then "do some 
CSS on it"! And the I added an extra CSS-class depending on the 
content-type (just if I should need it later on). :o)

tapio wrote:
>> BTW: Is there antoher way to do it; i.e. choose some setting/type for 
>> the content element in the BE so the element is rendered with some 
>> specific class-attribute? Like you can choose a different header type?
>
> you can easily with TypoScript template redefine rendering for all 
> content types, you want.
> Jus look at setup.txt of CSS Style Content and
> made a template, where you define new dataWrap for desired content
> type.
>
> Note however that headers are handled stand alone - which is sometime 
> problem.
>
> You can redefine headers for some sub-types
> tt_content.list = COA
> tt_content.list {
>                        10  = CASE
>                        10 {
>                               key.field = list_type
>
>                               mininews_pi1  = < lib.stdheader
>                               mininews_pi1 {
>                               stdWrap.dataWrap=<div class="csc-header 
> csc-header-mininews csc-header-mininews-n{cObj:parentRecordNumber}">|</div>
>                               }
>
>                              calendar_pi1  = < lib.stdheader
>                              calendar_pi1 {
>                              stdWrap.dataWrap=<div class="csc-header 
> csc-header-calendar csc-header-calendar-n{cObj:parentRecordNumber}"><div 
> class="parent">|</div></div>
>                              }
>
>                              default  = < lib.stdheader
>                              default {
>                              stdWrap.dataWrap=<div class="csc-header 
> csc-header-list csc-header-list-n{cObj:parentRecordNumber}">|</div>
>                              }
>                            }
>
>                       15 = TEXT
> 	15 {
> 	      field = subheader
> 	      required = 1
> 	       dataWrap = <p class="csc-subheader csc-list-subheader 
> csc-list-subheader-size-{field:header_layout}">|</p>
> 	       htmlSpecialChars = 1
>
> 	       editIcons = tt_content:subheader,layout
> 	       editIcons.beforeLastTag = 1
> 	       editIcons.iconTitle.data = 
> LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.subheader
>
> 	       prefixComment = 2 | Subheader:
> 	       }
> }
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

-------------- next part --------------
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.4/283 - Release Date: 16-03-2006


More information about the TYPO3-english mailing list