[TYPO3-english] How can I get the number of pictures in a image-block?

Peter Klein peter at umloud.dk
Mon Oct 13 18:19:55 CEST 2008


Hi Christopher.
Take a look at how a standard Image CE is rendered using TS, by using the 
Typoscript Object Browser.

Then you'll see a registervalue that might be usable for you.

register : IMAGE_NUM_CURRENT

Also take a look at how the original titleText/altText is defined.

--
Peter Klein

"Christopher" <Christopher at temporaryforwarding.com> wrote in message 
news:mailman.1.1223772840.25829.typo3-english at lists.netfielders.de...
> Hi guys,
>
> if click-enlarge is enabled, I want to give every picture a title-tag.
> At the moment I have got the following:
>
> tt_content.image.20.1.titleText.cObject = COA
> tt_content.image.20.1.titleText.cObject {
> 20 = COA
> # Only if click-enlarge is active:
> 20.if.isTrue.field = image_zoom
> 20 {
>  # If altText is empty:
>  # Use standard-text as title-Tag.
>  1 = TEXT
>  1.if.isFalse.field = altText
>  1.value = Click-enlarge me!
> }
> }
>
> The code works, but what I do not like about it is the following:
> I get the text "Click-enlarge me!" in the title-tag only once.
> So it only appears at the first image.
> If I have more than one picture, I want it to be there too.
>
> Is there a way to count the number of pictures attached and to add the tag 
> that number of times?
>
> Christopher
> 




More information about the TYPO3-english mailing list