# ***************************************************************************
# Notice: "styles." (and "temp.") objects are UNSET after template parsing!
# Use "lib." for persisting storage of objects.
# ***************************************************************************
# Clear out any constants in this reserved room!
styles.content >
# get content
styles.content.get = CONTENT
styles.content.get {
table = tt_content
select.orderBy = sorting
select.where = colPos=0
select.languageField = sys_language_uid
}
# get content, left
styles.content.getLeft < styles.content.get
styles.content.getLeft.select.where = colPos=1
# get content, right
styles.content.getRight < styles.content.get
styles.content.getRight.select.where = colPos=2
# get content, margin
styles.content.getBorder < styles.content.get
styles.content.getBorder.select.where = colPos=3
# get news
styles.content.getNews < styles.content.get
styles.content.getNews.select.pidInList = {$styles.content.getNews.newsPid}
# Edit page object:
styles.content.editPanelPage = COA
styles.content.editPanelPage {
10 = EDITPANEL
10 {
allow = toolbar,move,hide
label.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.page
label.wrap = | %s
}
}
# *********************************************************************
# "lib." objects are preserved from unsetting after template parsing
# *********************************************************************
# Creates a condition for targets. Not allowed in XHTML except for xhtml frames DTD
lib.parseTarget {
override =
override.if {
isTrue.data = TSFE:dtdAllowsFrames
}
}
# Creates persistent ParseFunc setup for non-HTML content. This is recommended to use (as a reference!)
lib.parseFunc {
makelinks = 1
makelinks.http.keep = {$styles.content.links.keep}
makelinks.http.extTarget < lib.parseTarget
makelinks.http.extTarget =
makelinks.http.extTarget.override = {$styles.content.links.extTarget}
makelinks.mailto.keep = path
tags {
link = TEXT
link {
current = 1
typolink.parameter.data = parameters : allParams
typolink.extTarget < lib.parseTarget
typolink.extTarget =
typolink.extTarget.override = {$styles.content.links.extTarget}
typolink.target < lib.parseTarget
typolink.target =
typolink.target.override = {$styles.content.links.target}
parseFunc.constants =1
}
}
allowTags = {$styles.content.links.allowTags}
denyTags = *
sword = |
constants = 1
nonTypoTagStdWrap.HTMLparser = 1
nonTypoTagStdWrap.HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}
}
# good old parsefunc in "styles.content.parseFunc" is created for backwards compatibility. Don't use it, just ignore.
styles.content.parseFunc < lib.parseFunc
# Creates persistent ParseFunc setup for RTE content (which is mainly HTML) based on the "ts_css" transformation.
lib.parseFunc_RTE < lib.parseFunc
lib.parseFunc_RTE {
// makelinks >
# Processing
and blocks separately
externalBlocks = article, aside, blockquote, div, dd, dl, footer, header, nav, ol, section, table, ul
externalBlocks {
# The blockquote content is passed into parseFunc again...
blockquote.stripNL=1
blockquote.callRecursive=1
blockquote.callRecursive.tagStdWrap.HTMLparser = 1
blockquote.callRecursive.tagStdWrap.HTMLparser.tags.blockquote.overrideAttribs = style="margin-bottom:0;margin-top:0;"
ol.stripNL=1
ol.stdWrap.parseFunc = < lib.parseFunc
ul.stripNL=1
ul.stdWrap.parseFunc = < lib.parseFunc
table.stripNL=1
table.stdWrap.HTMLparser = 1
table.stdWrap.HTMLparser.tags.table.fixAttrib.class {
default = contenttable
always = 1
list = contenttable
}
table.stdWrap.HTMLparser.keepNonMatchedTags = 1
table.HTMLtableCells=1
table.HTMLtableCells {
# Recursive call to self but without wrapping non-wrapped cell content
default.stdWrap {
parseFunc =< lib.parseFunc_RTE
parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag =
}
addChr10BetweenParagraphs=1
}
div.stripNL = 1
div.callRecursive = 1
article < .div
aside < .div
footer < .div
header < .div
nav < .div
section < .div
# Definition list processing
dl < .div
dd < .div
}
nonTypoTagStdWrap.encapsLines {
encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt
remapTag.DIV = P
nonWrappedTag = P
innerStdWrap_all.ifBlank =
addAttributes.P.class = bodytext
addAttributes.P.class.setOnly=blank
}
nonTypoTagStdWrap.HTMLparser = 1
nonTypoTagStdWrap.HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}
}
# Content header:
lib.stdheader = COA
lib.stdheader {
# Create class attribute for tags
3 = LOAD_REGISTER
3 {
headerClass {
cObject = COA
cObject {
# Create alignment class for tags
10 = TEXT
10 {
field = header_position
required = 1
noTrimWrap = |csc-header-alignment-| |
}
# Create "csc-firstHeader" class for tags
20 = TEXT
20 {
value = csc-firstHeader
if {
value = 1
equals.data = cObj:parentRecordNumber
}
}
stdWrap {
trim = 1
noTrimWrap = | class="|"|
required = 1
}
}
}
}
# Date format (not HTML5)
5 = TEXT
5 {
field = date
if {
isTrue {
field = date
}
isFalse = 1
isFalse {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
strftime = %x
wrap =
prefixComment = 2 | Header date:
}
# HTML5 open
7 = TEXT
7 {
value =
fieldRequired = subheader
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
# 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.dataWrap = |
10.2 < .10.1
10.2.dataWrap = |
10.3 < .10.1
10.3.dataWrap = |
10.4 < .10.1
10.4.dataWrap = |
10.5 < .10.1
10.5.dataWrap = |
# HTML5 subheader
20 = CASE
20 {
key {
field = header_layout
}
default = TEXT
default {
wrap = |
htmlSpecialChars = 1
field = subheader
}
1 < .default
2 < .default
2.wrap = |
3 < .default
3.wrap = |
4 < .default
4.wrap = |
5 < .default
5.wrap = |
if {
isTrue {
field = subheader
}
value = html5
equals.data = TSFE:config|config|doctype
# Hide subheader for old style form element (it is used for recipient mail)
isFalse = 0
isFalse.override = 1
isFalse.override {
if.equals.field = CType
if.value = mailform
}
}
}
# HTML5 close
30 < lib.stdheader.7
30 {
value =
}
# HTML5 Date
40 = COA
40 {
stdWrap {
wrap =
innerWrap {
cObject = COA
cObject {
10 = TEXT
10 {
value = |
}
}
}
required = 1
}
10 = TEXT
10 {
field = date
strftime = %B %e, %Y
}
if {
isTrue {
field = date
}
value = html5
equals.data = TSFE:config|config|doctype
}
}
# Pops the used registers off the stack:
98 = RESTORE_REGISTER
# Post-processing:
stdWrap.fieldRequired = header
stdWrap.if {
equals.field = header_layout
value = 100
negate = 1
}
stdWrap.editIcons = tt_content : header, [header_layout | header_position], [header_link|date]
stdWrap.editIcons.beforeLastTag = 1
stdWrap.editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.header
stdWrap {
dataWrap =
dataWrap {
override =
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
stdWrap.prefixComment = 2 | Header:
}
#******************************************************
# Including library for processing of some elements:
#******************************************************
includeLibs.tx_cssstyledcontent_pi1 = EXT:css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php
#**********************************
# tt_content is started
#**********************************
tt_content >
tt_content = CASE
tt_content.key.field = CType
tt_content.stdWrap {
innerWrap.cObject = CASE
innerWrap.cObject {
key.field = section_frame
default = COA
default {
10 = TEXT
10 {
cObject = CASE
cObject {
key.field = CType
default = TEXT
default {
value = renderSpace
space = before
constant = {$content.spaceBefore}
classStdWrap {
noTrimWrap = |csc-space-before-| |
}
}
# Create class for space after content
30 = USER
30 {
userFunc = tx_cssstyledcontent_pi1->renderSpace
space = after
constant = {$content.spaceAfter}
classStdWrap {
noTrimWrap = |csc-space-after-| |
}
}
stdWrap {
trim = 1
noTrimWrap = | class="|"|
required = 1
}
}
30 = TEXT
30 {
cObject = CASE
cObject {
key.field = CType
default = TEXT
default {
value = >|
}
menu < .default
menu {
override = >|
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
}
}
1 =< tt_content.stdWrap.innerWrap.cObject.default
1.20.10.value = csc-frame csc-frame-invisible
5 =< tt_content.stdWrap.innerWrap.cObject.default
5.20.10.value = csc-frame csc-frame-rulerBefore
6 =< tt_content.stdWrap.innerWrap.cObject.default
6.20.10.value = csc-frame csc-frame-rulerAfter
10 =< tt_content.stdWrap.innerWrap.cObject.default
10.20.10.value = csc-frame csc-frame-indent
11 =< tt_content.stdWrap.innerWrap.cObject.default
11.20.10.value = csc-frame csc-frame-indent3366
12 =< tt_content.stdWrap.innerWrap.cObject.default
12.20.10.value = csc-frame csc-frame-indent6633
20 =< tt_content.stdWrap.innerWrap.cObject.default
20.20.10.value = csc-frame csc-frame-frame1
21 =< tt_content.stdWrap.innerWrap.cObject.default
21.20.10.value = csc-frame csc-frame-frame2
66 = COA
66 {
10 = TEXT
10 {
value =
insertData = 1
}
# Create div with class for space before content
20 = COA
20 {
10 = USER
10 {
userFunc = tx_cssstyledcontent_pi1->renderSpace
space = before
constant = {$content.spaceBefore}
stdWrap {
wrap = csc-space-before-|
}
}
stdWrap {
wrap =
required = 1
}
}
30 = TEXT
30 {
value = |
}
# Create div with class for space after content
40 < .20
40 {
10 {
space = after
constant = {$content.spaceAfter}
stdWrap {
wrap = csc-space-after-|
}
}
}
}
}
innerWrap2 = | {LLL:EXT:css_styled_content/pi1/locallang.xml:label.toTop}
innerWrap2.insertData = 1
innerWrap2.fieldRequired = linkToTop
prepend = TEXT
prepend.dataWrap =
prepend.if.isTrue.field = _LOCALIZED_UID
editPanel = 1
editPanel {
allow = move,new,edit,hide,delete
line = 5
label = %s
onlyCurrentPid = 1
previewBorder = 4
edit.displayRecord = 1
}
prefixComment = 1 | CONTENT ELEMENT, uid:{field:uid}/{field:CType}
}
# *****************
# CType: header
# *****************
# See Object path "lib.stdheader"
tt_content.header = COA
tt_content.header {
10 = < lib.stdheader
20 = TEXT
20 {
field = subheader
required = 1
dataWrap =
htmlSpecialChars = 1
if {
value = html5
equals.data = TSFE:config|config|doctype
negate = 1
}
editIcons = tt_content:subheader,layout
editIcons.beforeLastTag = 1
editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.subheader
prefixComment = 2 | Subheader:
}
}
# *****************
# CType: text
# *****************
tt_content.text = COA
tt_content.text {
10 = < lib.stdheader
20 = TEXT
20 {
field = bodytext
required = 1
parseFunc = < lib.parseFunc_RTE
editIcons = tt_content:bodytext, rte_enabled
editIcons.beforeLastTag = 1
editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.bodytext
prefixComment = 2 | Text:
}
}
# *****************
# CType: image
# *****************
# (also used for rendering 'textpic' type):
tt_content.image = COA
tt_content.image.10 = < lib.stdheader
tt_content.image.20 = USER
tt_content.image.20 {
userFunc = tx_cssstyledcontent_pi1->render_textpic
# Image source
imgList.field = image
imgList.override.field = image_fileUids
imgPath = uploads/pics/
# Single image rendering
imgObjNum = 1
1 {
file.import.current = 1
file.width.field = imagewidth
imageLinkWrap = 1
imageLinkWrap {
bodyTag =
wrap = |
width = {$styles.content.imgtext.linkWrap.width}
height = {$styles.content.imgtext.linkWrap.height}
effects = {$styles.content.imgtext.linkWrap.effects}
JSwindow = 1
JSwindow.newWindow = {$styles.content.imgtext.linkWrap.newWindow}
JSwindow.if.isFalse = {$styles.content.imgtext.linkWrap.lightboxEnabled}
directImageLink = {$styles.content.imgtext.linkWrap.lightboxEnabled}
enable.field = image_zoom
enable.ifEmpty.typolink.parameter.field = image_link
enable.ifEmpty.typolink.parameter.listNum.splitChar = 10
enable.ifEmpty.typolink.parameter.listNum.stdWrap.data = register : IMAGE_NUM_CURRENT
enable.ifEmpty.typolink.returnLast = url
typolink.parameter.field = image_link
typolink.parameter.listNum.splitChar = 10
typolink.parameter.listNum.stdWrap.data = register : IMAGE_NUM_CURRENT
typolink.target < lib.parseTarget
typolink.target =
typolink.target.override = {$styles.content.links.target}
typolink.extTarget < lib.parseTarget
typolink.extTarget =
typolink.extTarget.override = {$styles.content.links.extTarget}
linkParams.ATagParams.dataWrap = class="{$styles.content.imgtext.linkWrap.lightboxCssClass}" rel="{$styles.content.imgtext.linkWrap.lightboxRelAttribute}"
}
altText = TEXT
altText {
field = altText
stripHtml = 1
split.token.char = 10
split.token.if.isTrue = {$styles.content.imgtext.imageTextSplit}
split.returnKey.data = register : IMAGE_NUM_CURRENT
}
params =
params {
override {
dataWrap = aria-describedby="csc-longdesc-{field:uid}-{register:IMAGE_NUM_CURRENT}"
if {
isTrue {
cObject = TEXT
cObject {
field = imagecaption
required = 1
parseFunc =< lib.parseFunc
split {
token {
char = 10
if.isPositive = {$styles.content.imgtext.imageTextSplit} + {$styles.content.imgtext.captionSplit}
}
returnKey.data = register : IMAGE_NUM_CURRENT
}
}
}
isFalse = 1
isFalse {
if {
isFalse {
cObject = TEXT
cObject {
field = longdescURL
split {
token {
char = 10
}
returnKey.data = register : IMAGE_NUM_CURRENT
}
}
}
}
}
isPositive = {$styles.content.imgtext.imageTextSplit} + {$styles.content.imgtext.captionSplit}
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
titleText < .altText
titleText.field = titleText
longdescURL {
parameter {
field = longdescURL
split {
token {
char = 10
}
returnKey.data = register : IMAGE_NUM_CURRENT
}
}
}
emptyTitleHandling = {$styles.content.imgtext.emptyTitleHandling}
titleInLink = {$styles.content.imgtext.titleInLink}
titleInLinkAndImg = {$styles.content.imgtext.titleInLinkAndImg}
}
textPos.field = imageorient
maxW = {$styles.content.imgtext.maxW}
maxW.override.data = register:maxImageWidth
maxWInText = {$styles.content.imgtext.maxWInText}
maxWInText.override.data = register:maxImageWidthInText
equalH.field = imageheight
image_compression.field = image_compression
image_effects.field = image_effects
noRows.field = image_noRows
cols.field = imagecols
border.field = imageborder
caption {
1 = COA
1 {
1 = TEXT
1 {
field = imagecaption
required = 1
parseFunc =< lib.parseFunc
br = 1
split.token.char = 10
split.token.if.isPositive = {$styles.content.imgtext.imageTextSplit} + {$styles.content.imgtext.captionSplit}
split.returnKey.data = register : IMAGE_NUM_CURRENT
}
stdWrap {
required = 1
typolink {
parameter {
field = longdescURL
trim = 1
split {
token {
char = 10
}
returnKey.data = register : IMAGE_NUM_CURRENT
}
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
ATagParams {
dataWrap = id="csc-longdesc-{field:uid}-{register:IMAGE_NUM_CURRENT}"
}
target = {$styles.content.links.target}
extTarget = {$styles.content.links.extTarget}
}
}
}
}
# captionSplit is deprecated, use imageTextSplit instead
captionSplit = {$styles.content.imgtext.captionSplit}
captionAlign.field = imagecaption_position
# caption/alttext/title/longdescURL splitting
imageTextSplit = {$styles.content.imgtext.imageTextSplit}
borderCol = {$styles.content.imgtext.borderColor}
borderThick = {$styles.content.imgtext.borderThick}
borderClass = {$styles.content.imgtext.borderClass}
colSpace = {$styles.content.imgtext.colSpace}
rowSpace = {$styles.content.imgtext.rowSpace}
textMargin = {$styles.content.imgtext.textMargin}
borderSpace = {$styles.content.imgtext.borderSpace}
separateRows = {$styles.content.imgtext.separateRows}
addClasses =
addClassesCol =
addClassesCol.ifEmpty = csc-textpic-firstcol csc-textpic-lastcol
addClassesCol.override = csc-textpic-firstcol |*| |*| csc-textpic-lastcol
addClassesCol.override.if {
isGreaterThan.field = imagecols
value = 1
}
addClassesImage = csc-textpic-first |*| |*| csc-textpic-last
#
imageStdWrap.dataWrap = |
imageStdWrapNoWidth.wrap = |
# if noRows is set, wrap around each column:
imageColumnStdWrap.dataWrap = |
layout = CASE
layout {
key.field = imageorient
# above-center
default = TEXT
default.value = ###IMAGES######TEXT###
# above-right
1 = TEXT
1.value = ###IMAGES######TEXT###
# above-left
2 = TEXT
2.value = ###IMAGES######TEXT###
# below-center
8 = TEXT
8.value = ###TEXT######IMAGES###
# below-right
9 = TEXT
9.value = ###TEXT######IMAGES###
# below-left
10 = TEXT
10.value = ###TEXT######IMAGES###
# intext-right
17 = TEXT
17.value = ###IMAGES######TEXT###
# intext-left
18 = TEXT
18.value = ###IMAGES######TEXT###
# intext-right-nowrap
25 = TEXT
25.value = ###IMAGES######TEXT###
# intext-left-nowrap
26 = TEXT
26.value = ###IMAGES######TEXT###
}
rendering {
# Single image - No caption
singleNoCaption {
# Choose another rendering for special edge cases
fallbackRendering = COA
fallbackRendering {
# Single image - Caption
10 = TEXT
10 {
if {
isTrue.field = imagecaption
value = 1
equals.data = register:imageCount
}
value = singleCaption
}
# Multiple images and split caption
20 = TEXT
20 {
if {
value = 1
isGreaterThan.data = register:imageCount
isTrue.if.isFalse.data = register:renderGlobalCaption
isTrue.field = imagecaption
}
value = splitCaption
}
# Multiple images and one global caption
30 = TEXT
30 {
if {
value = 1
isGreaterThan.data = register:imageCount
isTrue.if.isTrue.data = register:renderGlobalCaption
isTrue.field = imagecaption
}
value = globalCaption
}
# Multiple images and no caption at all
40 = TEXT
40 {
if {
value = 1
isGreaterThan.data = register:imageCount
isFalse.field = imagecaption
}
value = noCaption
}
}
allStdWrap {
wrap = |
innerWrap.cObject = CASE
innerWrap.cObject {
key.field = imageorient
# above-center
0 = TEXT
0.value =
# below-center
8 < .0
}
}
singleStdWrap {
wrap = |
wrap {
override = |
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
rowStdWrap.wrap = |
noRowsStdWrap.wrap = |
lastRowStdWrap.wrap = |
columnStdWrap.wrap = |
imgTagStdWrap.wrap = |
editIconsStdWrap.wrap = |
caption.wrap = |
}
noCaption {
# Multiple images and no caption at all
fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
allStdWrap.wrap = |
singleStdWrap {
wrap = |
wrap {
override = |
}
}
rowStdWrap.wrap = |
noRowsStdWrap.wrap = |
lastRowStdWrap.wrap = |
columnStdWrap.wrap = |
}
singleCaption {
# Just one image with a caption
fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
singleStdWrap {
wrap =
wrap {
override = |###CAPTION###
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
caption {
required = 1
wrap = |
wrap {
override = |
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
}
splitCaption {
fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
singleStdWrap {
wrap =
wrap {
override = |###CAPTION###
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
rowStdWrap.wrap = |
noRowsStdWrap.wrap = |
lastRowStdWrap.wrap = |
columnStdWrap.wrap = |
caption {
required = 1
wrap = |
wrap {
override = |
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
}
globalCaption {
# Just one image without a caption
fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
allStdWrap {
wrap =
wrap {
override = | ###CAPTION###
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
singleStdWrap {
wrap = |
wrap {
override = |
}
}
rowStdWrap.wrap = |
noRowsStdWrap.wrap = |
lastRowStdWrap.wrap = |
columnStdWrap.wrap = |
caption {
required = 1
wrap = |
wrap {
override = |
override {
if {
value = html5
equals.data = TSFE:config|config|doctype
}
}
}
}
}
}
renderMethod = singleNoCaption
editIcons = tt_content : image [imageorient|imagewidth|imageheight], [imagecols|image_noRows|imageborder],[image_link|image_zoom],[image_compression|image_effects|image_frames],imagecaption[imagecaption_position]
editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.images
caption.editIcons = tt_content : imagecaption[imagecaption_position]
caption.editIcons.beforeLastTag=1
caption.editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.caption
stdWrap.prefixComment = 2 | Image block:
}
# *****************
# CType: textpic
# *****************
tt_content.textpic = COA
tt_content.textpic {
10 = COA
10.if.value = 25
10.if.isLessThan.field = imageorient
10.10 = < lib.stdheader
20 = < tt_content.image.20
20 {
text.10 = COA
text.10 {
if.value = 24
if.isGreaterThan.field = imageorient
10 = < lib.stdheader
10.stdWrap.dataWrap =
}
text.20 = < tt_content.text.20
text.wrap = |
}
}
# *****************
# CType: bullet
# *****************
tt_content.bullets = COA
tt_content.bullets {
10 = < lib.stdheader
20 = TEXT
20 {
field = bodytext
trim = 1
split{
token.char = 10
cObjNum = |*|1|| 2|*|
1.current = 1
1.parseFunc =< lib.parseFunc
1.wrap = |
2.current = 1
2.parseFunc =< lib.parseFunc
2.wrap = |
}
dataWrap =
editIcons = tt_content: bodytext, [layout]
editIcons.beforeLastTag = 1
editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.bullets
prefixComment = 2 | Bullet list:
}
}
# *****************
# CType: uploads
# *****************
tt_content.uploads = COA
tt_content.uploads {
10 = < lib.stdheader
20 = FILES
20 {
# get from file references:
references {
table = tt_content
fieldName = media
}
collections.field = file_collections
# get from path (backwards compatibility, contains strings like "fileadmin/user_uploads/")
folders.field = select_key
# render the files
renderObj = COA
renderObj {
10 = IMAGE
10 {
file.import.data = file:current:originalUid // file:current:uid
file.width = 150
stdWrap {
if.value = 1
if.isGreaterThan.field = layout
typolink {
parameter.data = file:current:originalUid // file:current:uid
parameter.wrap = file:|
target < lib.parseTarget
target =
target.override = {$styles.content.uploads.target}
removePrependedNumbers = 1
/*
jumpurl = {$styles.content.uploads.jumpurl}
jumpurl {
secure = {$styles.content.uploads.jumpurl_secure}
secure.mimeTypes = {$styles.content.uploads.jumpurl_secure_mimeTypes}
}
*/
}
}
}
# icon
15 = IMAGE
15 {
file.import = typo3/gfx/fileicons/
file.import.data = file:current:extension
file.import.case = lower
file.import.wrap = |.gif
stdWrap {
if {
value = 0
isGreaterThan.field = layout
# only show the icon if we don't have a thumbnail:
isFalse.cObject = IMG_RESOURCE
isFalse.cObject.file < tt_content.uploads.20.renderObj.10.file
isFalse.cObject.stdWrap.if < tt_content.uploads.20.renderObj.10.stdWrap.if
}
typolink < tt_content.uploads.20.renderObj.10.stdWrap.typolink
}
}
# filename
20 = TEXT
20 {
data = file:current:name
htmlSpecialChars = 1
required = 1
replacement {
# equivalent to former useSpacesInLinkText = 0; remove using > to disable it
10 {
search = _
replace.char = 32
}
# equivalent to former stripFileExtensionFromLinkText = 0; move "_20" to "20" to enable it. Disabled by default.
_20 {
search = /(.*)(\..*)/
replace = \1
useRegExp = 1
}
}
typolink < tt_content.uploads.20.renderObj.10.stdWrap.typolink
wrap = |
}
# description
30 = TEXT
30 {
data = file:current:description
htmlSpecialChars = 1
wrap = |
required = 1
}
# file size
40 = TEXT
40 {
if.isTrue.field = filelink_size
data = file:current:size
wrap = |
bytes = 1
bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
}
# wrap of each listed file with odd/even class
wrap.cObject = COA
wrap.cObject {
10 = LOAD_REGISTER
10 {
oddEvenClass = li-odd li-first |*| li-even || li-odd
elementClass = csc-uploads-element csc-uploads-element-{file:current:extension}
elementClass.insertData = 1
}
20 = TEXT
20 {
value = |
insertData = 1
}
30 = RESTORE_REGISTER
}
}
# wrap around whole content element with