Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bootstrap3 Carousel mit Grid Elements für TYPO3. http://www.merec.org/typo3/bootstrap3-carousel-mit-grid-elements-fuer-typo3
# Carousel Container
tx_gridelements.setup.uebb_bootstrap_carousel_container {
title = Carousel Container
description = Ein Element, dass mehrere Carousel Elemente enthält
flexformDS = FILE:fileadmin/templates/gridelements/bootstrap3_carousel/bootstrap3_carousel_container.xml
config {
colCount = 1
rowCount = 1
rows {
1 {
columns {
1 {
name = Carousel Container
colPos = 0
allowed = gridelements_pi1
}
}
}
}
}
}
# Carousel Element
tx_gridelements.setup.uebb_bootstrap_carousel_item {
title = Carousel Element
description = Ein Element für ein Carousel-Container
config {
colCount = 4
rowCount = 1
rows {
1 {
columns {
1 {
name = Bild (max. 1)
colPos = 0
allowed = image
}
2 {
name = Inhalt
colspan = 3
colPos = 1
allowed = header,text
}
}
}
}
}
}
# Carousel Item
# First define the carousel item cObject, we want this in the container
tt_content.gridelements_pi1.20.10.setup.uebb_bootstrap_carousel_item {
# item wrap, first item has active flag
stdWrap {
outerWrap = <div class="item">|</div>
outerWrap.override = <div class="item active">|</div>
outerWrap.override.if {
value = 1
equals.data = cObj:parentRecordNumber
equals.prioriCalc = 1
}
}
columns.0 {
renderObj = COA
renderObj {
5 = FILES
5 {
references {
table = tt_content
uid.field = uid
fieldName = image
}
renderObj = IMAGE
renderObj {
file.import.data = file:current:publicUrl
titleText.data = file:current:title
altText.data = file:current:alternative
stdWrap.typolink.parameter.data = file:current:link
}
}
}
}
columns.1 {
wrap = <div class="carousel-caption">|</div>
renderObj = COA
renderObj {
# Header
10 = TEXT
10 {
field = header
wrap = <h3>|</h3>
if.isTrue.field = header
}
20 = TEXT
20 {
field = bodytext
parseFunc < lib.parseFunc_RTE
}
}
}
}
# We need this to calculate the interval (s -> ms)
lib.math = TEXT
lib.math {
current = 1
prioriCalc = 1
}
# Carousel Container
tt_content.gridelements_pi1.20.10.setup.uebb_bootstrap_carousel_container {
cObject = FLUIDTEMPLATE
cObject {
file = fileadmin/templates/gridelements/bootstrap3_carousel/bootstrap3_carousel_container_template.html
}
columns.0 {
renderObj < tt_content.gridelements_pi1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment