[TYPO3-german] Jedem zweiten Element classe zuweisen.
Magdalena Borkowski
info at meg-creation.de
Thu Jan 25 09:51:12 CET 2018
Hallo Ihr Lieben,
also ich bin noch sehr neu in der Typo3 Welt und blick noch nicht durch alles durch.
Ich möchte jedem zweiten Element die classe="timeline-inverted" geben und der macht bei meinem bei jedem ersten. Was verstehe ich nicht?
lib.timeline = CONTENT
lib.timeline {
table = tt_content
select {
pidInList = 30
languageField=sys_language_uid
selectFields=header,bodytext,image
orderBy = sorting
where=colPos=0
}
renderObj = COA
renderObj {
5 = LOAD_REGISTER
5 {
divEvent.data = register:divEvent
divEvent.stdWrap.wrap = |+1
divEvent.prioriCalc = 1
}
20 = TEXT
20.value = <li>
20.override.if.value = 1
20.override = <li class="timeline-inverted">
20.override.if {
equals.data = register:divEvent
# %2 bedeutet jeder 2.
equals.stdWrap.wrap = |%2
equals.prioriCalc = 1
#value = 0
}
25 = TEXT
25.value = <div class="timeline-image">
30 = FILES
30 {
references {
table = tt_content
uid.data = field:uid
fieldName = assets
}
renderObj = IMAGE
renderObj.params = class="img-circle img-responsive"
renderObj.file.import.data = file:current:uid
renderObj.file.treatIdAsReference = 1
}
35 = TEXT
35.value = </div>
40 = TEXT
40.value = <div class="timeline-panel">
50 = TEXT
50.field = header
50.dataWrap = <div class="timeline-heading"><h4>|</h4></div>
60 = TEXT
60.field = bodytext
60.parseFunc < lib.parseFunc_RTE
60.wrap = <div class="timeline-body">|</div>
70 = TEXT
70.value = </div>
80 = TEXT
80.value = <div class="line"></div>
90 = TEXT
90.value = </li>
}
}
More information about the TYPO3-german
mailing list