[TYPO3-english] solved create default caption if none was entered
Ronald Renfro
rr at dreimorgen.com
Fri Dec 19 19:15:07 CET 2008
I found a sollution...
I added another cobj with condition isEmpty... now it displays when
nothing was entered...
caption {
...
2 = TEXT
2 {
if.isEmpty.field = imagecaption
value = <div class="caption">Caption here</div>
}
} // eof caption
On 19.12.2008, at 19:04, Ronald Renfro wrote:
> 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
> }
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
----------
Dreimorgen Frankfurt
Entwicklung und Optimierung von Marken- und Unternehmensidentitäten
Mörfelder Landstraße 109
60598 Frankfurt am Main
Telefon: 069 - 963 768 78 - 0
Telefax: 069 - 963 768 78 - 9
http://www.dreimorgen.com
----------
Ghassemlou Renfro GbR
USt-IdNr: DE238938998
----------
More information about the TYPO3-english
mailing list