[TYPO3-english] create default caption if none was entered
Ronald Renfro
rr at dreimorgen.com
Fri Dec 19 19:04:36 CET 2008
Hi List,
how can I specify a default caption for imgtext content elements if no
text was entered?
I tried using the ifEmpty stdWrap parameter it is not correct....
thanks!
tt_content.image.20 {
caption {
1 = TEXT
1 {
if.isTrue.field = imagecaption
field = imagecaption
required = 1
parseFunc =< styles.content.parseFunc
br = 1
fontTag = <span class="teaser">|</span>
wrapAlign.field = imagecaption_position
split.token.char = 10
split.returnKey.cObject = COA
split.returnKey.cObject {
10 = TEXT
10.data = register:caption_counter
20 = LOAD_REGISTER
20 {
caption_counter {
cObject = TEXT
cObject.dataWrap = {register:caption_counter}
+1
prioriCalc = intval
}
}
}
}
// **** unfortunatly this does not work **** //
ifEmpty.cObject {
10 = TEXT
10.value = <div class="caption">My default Caption here</div>
}
}
captionSplit = 1
imageTextSplit = 1
}
More information about the TYPO3-english
mailing list