[TYPO3] Wrap certain content-elements with a DIV
tapio
tapio.markula at dnainternet.net
Fri Mar 17 11:42:18 CET 2006
> 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:
}
}
More information about the TYPO3-english
mailing list