[TYPO3] help needed - captions splits??

Katja Lampela katja.lampela at lieska.net
Mon May 8 23:52:27 CEST 2006


Chi Hoang wrote:
>> Katja Lampela schrieb:
>>
>>> Well - captionSplit has been removed in favor of a split function 
>>> which is located directly in caption.
> 
> 
>  Dear Katja, Joey is wrong here. That split function simply doesn't 
> exist in the static template "content (default)" of T3 4.0.
> 
>  You can write this into your TS-Setup:
> 
>  temp.myCaption = COA
>  temp.myCaption {
>  1.if.isTrue.field = imagecaption
>  1 = TEXT
>  1.field = imagecaption
>  1.listNum.splitChar = 10
>  1.listNum.stdWrap.data = register : IMAGE_NUM
>  1.parseFunc < styles.content.parseFunc
>  1.wrapAlign.field = imagecaption_position
>  1.wrap = |<br>
> }
> 
> tt_content {
> textpic {
> 20.1.stdWrap.prepend < temp.myCaption
> 20.caption >
> 20.captionSplit >
> }
> image {
> 20.1.stdWrap.prepend < temp.myCaption
> 20.caption >
> 20.captionSplit >
> }

Dear Chi,

Thank you very much for reply. I tested your code and it worked fine - 
though the captions were above the pictures (this is probably changeable ).

Joey though provided a solution for captions to show in default template 
in a traditional way:

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

#ATTENTION: this results double first-captions:
#split.returnKey.data = register : IMAGE_NUM


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
         }
     }
}
     }
}
captionSplit = 1
imageTextSplit = 1
}
tt_content.textpic {
    20 =< tt_content.image.20
}



More information about the TYPO3-english mailing list