[TYPO3] help needed - captions splits??

Katja Lampela katja.lampela at lieska.net
Sat May 6 19:16:32 CEST 2006


JoH wrote:
>>If you take a closer look you will see that caption contains more
>>than one line.
> 
> 
> Hit the RETURN key to fast.
> 
> And you will notice that split is a stdWrap function and not just a boolean
> switch.
> Take a look at this
> http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/5/6/
> to find out how it works.
> The parameter returnKey has been implemented in T3 4.0 and is not yet
> documented in TSref.
> This enables the split function to get the information which part of the
> splitted content should be used from another source.
> In this case it's a register containing the current image number.
> 
> Here's the complete code of CSS styled content which is related to captions
> and splitting them into smaller chunks:
> 
> caption {
>     1 = TEXT
>     1 {
>         field = imagecaption
>         required = 1
>         parseFunc =< lib.parseFunc
>         br = 1
>         fontTag = <p class="csc-caption">|</p>
>         wrapAlign.field = imagecaption_position
>         split.token.char = 10
>         split.token.if.isPositive = {$styles.content.imgtext.imageTextSplit}
> + {$styles.content.imgtext.captionSplit}
>         split.returnKey.data = register : IMAGE_NUM
>     }
> }
> captionSplit = {$styles.content.imgtext.captionSplit}
> imageTextSplit = {$styles.content.imgtext.imageTextSplit}
> 
> You can remove the constants if you like so it will be always activated and
> the code looks like this:
> 
> tt_content.image.20 {
> ###.... blah, blah, some other TS stuff ...
> caption {
>     1 = TEXT
>     1 {
>         field = imagecaption
>         required = 1
>         parseFunc =< lib.parseFunc
>         br = 1
>         fontTag = <p class="csc-caption">|</p>
>         wrapAlign.field = imagecaption_position
>         split.token.char = 10
>         split.returnKey.data = register : IMAGE_NUM
>     }
> }
> captionSplit = 1
> imageTextSplit = 1
> ###.... blah, blah, some other TS stuff ...
> }
> 
> This has to be part of
> 
> tt_content.image.20
> AND
> tt_content.textpic.20
> 
> and this means you have to copy the whole setup after changing it if you are
> not using CSS-styled-content original TS setup.
> In the original setup there is a reference operator that will copy changes
> to tt_content.image.20 automatically.
> 
> tt_content.textpic {
> ###.... blah, blah, some other TS stuff ...
>    20 =< tt_content.image.20
> ###.... blah, blah, some other TS stuff ...
> }
> 
> If this is not the case with your template you will have to implement it to
> make sure that caption split is activated for both: "Images" and "Text with
> images".
> This will work with TYPO3 4.0X only, since the register: IMAGE_NUM was not
> available in earlier versions.
> 
> HTH
> 
> Joey
> 

Joey you're the Man!!

Thank you so very much (contact you soon)

Katja



More information about the TYPO3-english mailing list