[TYPO3-english] Injecting new attributes to link tag

Robert Wildling robertwildling at gmail.com
Sun Mar 18 17:52:28 CET 2012


Hi, Francois,

Thank you - that looks great!
Unfortunately I can't get it to work. Could you?

Not even the line
tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams >

will stop TYPO3 from generating the title tag in the link anyway. Only
tt_content.image.20.1.titleInLink = 0
will stop it from doing so...

This is my setup in the root (I include 3 CEs in a multicolumn element):

// remove the colum wraps from multicontent
//plugin.tx_jfmulticontent_pi1.columnWrap.wrap = <li 
class="first">|</li>   |*| <li>|</li>   |*| <li class="last">|</li>

plugin.tx_jfmulticontent_pi1 {
   columnWrap.wrap = |
   tabWrap.wrap = |
   tabKey = TEXT
   tabKey {
     value = {register:key}-{register:id}
     insertData = 1
   }|
}
/*
// Remove standard CSS
plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE >
plugin.tx-felogin-pi1._CSS_DEFAULT_STYLE >
plugin.form._CSS_DEFAULT_STYLE >

New since 4.5 (or 4.6?)
*/
config.removeDefaultCss = 1

# wraps around everything
tt_content.image.20.renderMethod = ul
tt_content.image.20.rendering.ul.imageRowStdWrap.dataWrap =|
tt_content.image.20.rendering.ul.imageLastRowStdWrap.dataWrap =|
tt_content.image.20.rendering.ul.oneImageStdWrap.dataWrap = |
tt_content.image.20.rendering.ul.noRowsStdWrap.wrap = <div 
class="sc_menu_wrapper"><div class="sc_menu">|</div></div>
tt_content.image.20.rendering.ul.caption.wrap = |

tt_content.image.20.rendering.simple.caption.wrap = |
tt_content.image.20.rendering.simple.imageStdWrap.dataWrap = |
# wrap around single image
tt_content.image.20.imageStdWrap.dataWrap = |
tt_content.image.20.imageStdWrapNoWidth.wrap = |
tt_content.image.20.imageColumnStdWrap.dataWrap = |
tt_content.image.20.layout.default.value = ###IMAGES###

tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams >
tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams.cObject = COA
tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams.cObject {
     10 < tt_content.image.20.1.titleText
     10.noTrimWrap = | data-lightview-caption="|" |
}
tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams.dataWrap = 
|class="lightbox" data-lightview-group="lightview[{field:uid}]"


// OLD STUFF
#tt_content.image.20.1.imageLinkWrap.JSwindow = 0
#tt_content.image.20.1.titleInLink = 0
# true causes errors with ALTAIR GD (ImageMagick-substitute)
#tt_content.image.20.1.imageLinkWrap.directImageLink = 1
#tt_content.image.20.1.imageLinkWrap.directImageLink = 0
#tt_content.image.20.1.imageLinkWrap.typolink.ATagParams = 
class="lightbox" rel="lightbox[{field:uid}]"
#tt_content.image.20.1.imageLinkWrap.typolink.ATagParams.dataWrap = 
rel="lightbox[{field:uid}]" data-lightview-group="lightbox[{field:uid}]"


I'd appreciate any more hints!

Thanks a lot, Francois!!!
Gruezi!


Am 18.03.12 16:36, schrieb François Suter:
> Hi Robert,
>
>> Well, thanks for responding, but not reading the thread and just posting
>> sth is - to be honest - not much of a help.
>
> Actually I was answering your latest question, which is that - yes -
> ATagParams has stdWrap properties. You were asking that, remember?
>
> So anyway, your idea was good, but there's a weird trick, which took me
> a while finding (I'm not so used to that part of css_styled_content):
> the ATagParams of the typolink in that case is not used. Instead,
> there's a separate property "linkParams".
>
> Knowing that, the solution becomes:
>
> tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams >
> tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams.cObject = COA
> tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams.cObject {
> 10 < tt_content.image.20.1.altText
> 10.noTrimWrap = | data-lightview-caption="|"|
> }
> tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams.dataWrap =
> |class="lightbox" rel="lightbox[{field:uid}]"
>
> The last line modifies the existing linkParams configuration to keep the
> values defined in the cObject.COA part (it adds a pipe symbol at the
> beginning).
>
> Cheers
>



More information about the TYPO3-english mailing list