[TYPO3-english] Injecting new attributes to link tag

François Suter fsu-lists at cobweb.ch
Mon Mar 19 14:18:07 CET 2012


Hi Robert,

> Everything works fine as long as the Images link to themselves. But as
> soon as I fill in the "Links" field in the "Behavior" field with some
> other images , the links will not be generated anymore.

What a surprising behavior ;-) I've got it working, but that was a tough 
one. As you found out indeed, when the image does not link to itself, 
only the "typolink" property of "imageLinkWrap" is used. This is 
actually more or less what is stated in the TSref, but not in a very 
understandable way.

So your initial idea was good, but I had changed it because I was 
linking to the images themselves (what a confusion!). Here's the code 
that works for me:

tt_content.image.20.1.imageLinkWrap.typolink.ATagParams.cObject = COA
tt_content.image.20.1.imageLinkWrap.typolink.ATagParams.cObject {
   10 < tt_content.image.20.1.altText
   10.noTrimWrap = | data-lightview-caption="|"|
}

HTH

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-english mailing list